i wrote a script in cmd (*.cmd) that copy some file to ftp server, its working and its fine. this is the code:
@echo off
# put the command lines in to txt file
echo cd wf/721/pages >> temp.txt
echo put C:\Users\tc99670\Desktop\tempwf\721\pages\channel.json >> temp.txt
echo put C:\Users\tc99670\Desktop\tempwf\721\pages\main-screen.json >> temp.txt
echo put C:\Users\tc99670\Desktop\tempwf\721\pages\settings.json >> temp.txt
echo put C:\Users\tc99670\Desktop\tempwf\721\pages\wihow to usefi.json >> temp.txt
echo quit >> temp.txt
# connect to ftp and running the all the command in the txt file
ftp -n -s:temp.txt 150.42.40.221
# deleting the txt file
del temp.txt
its working great but when i tried to add the user input option its not working any more:
@echo off
set /P path=Enter path:
echo cd wf/721/pages >> temp.txt
echo put %path%\721\pages\channel.json >> temp.txt
echo put %path%\721\pages\main-screen.json >> temp.txt
echo put %path%\721\pages\settings.json >> temp.txt
echo put %path%\721\pages\wifi.json >> temp.txt
echo quit >> temp.txt
ftp -n -s:temp.txt 150.42.40.221
del temp.txt
i dont know what went wrong, thanks for your help :)