Hi all,
In a batch file, I have the following command that sometimes fails, and retries again and again. I wish to ensure that I can control the number of retries and the pause between them, so that I avoid being blocked from the server:
wscp418.exe /console /passive /command "option batch on" "option confirm off" "open ftp://username:pw@ftp.someserver.com" "cd somefolder" "mkdir %CurDate%" "cd %CurDate%" "put C:\somefolder\todaysbackups\*.zip" "close" "exit"
How can I specify the number of retries if the connection fails, and the time between them?
Would be practical to know both if it is possible to specify retries etc. on the command line, but also how to make a "ini-file" or "config-file" and point to it form the command line.
Apart from the number of retries, here are the options I need:
Pause: Does some command option like this exist? I am in need of a way to specify the number of seconds between EACH retry. (Example: 5 retries, with a pause of 300 seconds between each one if no connection is made)
Timeout: the number of seconds to wait for a connection. Does such an option exist?
I imagine something like this in myinifile.ini :
retries = 5
pause = 300
timeout = 30
I also assume that I can let the myinifile.ini be in the same folder as the executable, and call it from the above mentioned command line like this
"/ini=myinifile.ini"
How exactly should such statements be put in an ini file? One on each line?
Is it important if there are spaces or not around the = (equal) characters?