【发布时间】:2014-12-31 19:47:59
【问题描述】:
由于某种原因,当我的网络中断时,我的脚本不会中止。
命令如下:
"%~dp0\winscp.exe" /console /script="script.txt"
exit
和script.txt:
option batch abort
option confirm off
open ftp://user:pass@ftp.site.com/
cd /directory/
synchronize local
exit
当我拉我的网线(测试网络掉线)时,我得到:
The requested name is valid, but no data of the requested type was found.
Connection failed.
(A)bort, (R)econnect (5 s):
..
(A)bort, (R)econnect (0 s): Reconnect
它将继续无限期地尝试重新连接。
为什么脚本不自动中止?我正在使用option batch abort。我错过了什么吗?
【问题讨论】:
标签: cmd batch-processing winscp