cmd - WinSCP script will not exit after error, even with "option batch abort" -
cmd - WinSCP script will not exit after error, even with "option batch abort" -
for reason when network drops script not abort.
here's command:
"%~dp0\winscp.exe" /console /script="script.txt" exit
and script.txt:
option batch abort alternative confirm off open ftp://user:pass@ftp.site.com/ cd /directory/ synchronize local exit
when pull network cable (to test network drop) get:
the requested name valid, no info of requested type found. connection failed. (a)bort, (r)econnect (5 s): .. (a)bort, (r)econnect (0 s): reconnect
it go on seek , reconnect indefinitely.
why doesn't script auto abort? using option batch abort
. missing something?
this error recoverable, winscp keeps trying resume transfer option batch abort
documented:
... when batch mode set on
selection prompt automatically replied negatively. unless prompt has different default reply (such default “reconnect” reply reconnect prompt), in case default reply used (after short time interval). see reconnecttime
alternative below. value abort
on
. ...
as mentioned above, can configure how long winscp tries reconnect using option reconnecttime
. default winscp tries reconnect indefinitely.
this changed in latest beta branch (winscp 5.6.x) option batch on/abort
winscp tries 2 minutes (equivalent of option reconnecttime 120
).
cmd batch-processing winscp
Comments
Post a Comment