I am writing a .cmd Windows script to be run in batch mode. This script uses the ftp command. After a successsful connection to another machine using ftp, the shell changes, and the execution of the script becomes interactive.
How can I make it in batch mode, so as not to stop the execution of he whole script?
thanks.
I think you can use bye
to quit an ftp session to return to the batch.
Alternatively, put the ftp commands in a separate batch file and use call
to call it.
rem do stuff
rem do ftp stuff
call ftpscript.bat
rem carry on doing stuff
This code for me:
ftp -i -n -s:%currentFolderPath%ftp_commands.txt %IPAddress%
Read:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.