1
由於某些原因,當我的網絡丟失時,我的腳本不會中止。WinSCP腳本不會在出錯後退出,即使是「選項批量中止」
這裏的命令:
"%~dp0\winscp.exe" /console /script="script.txt"
exit
和script.txt:
option batch abort
option confirm off
open ftp://user:[email protected]/
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
。我錯過了什麼嗎?
抓住一個測試版,謝謝!答應我下次再讀一遍:D – pan 2014-11-05 18:21:10