I'm scripting for FTP.EXE in dos. I wrote a batch file and a script file to be executed by the FTP.EXE program. In the batch file I have this line:
[italic]ftp -s:.Funcs.txt >> .Log.txt[/italic]
That executes the program with the script file and does all my uploading. This program works fine. No problems, unless I lose my connection. When the FTP program loses connection it just executes what is left in the script while not connected. I dislike this. The program fails and has to be run again.
How can I get the FTP batch file or script to detect when the connection is lost and either reconnect immediately THEN resume with the rest of the instructions or detect that the connection was lost and run the program again in the batch file?
Thanks. Any feedback is appreciated!
0 · ·