我有一个脚本,正在从远程服务器复制到我的本地 PC。批处理文件正在运行,但当 IP 10.223.19.51 关闭/断电时,脚本不会运行下一个命令行。它给我一个错误。请参阅下面的脚本。请帮忙。我希望即使其他服务器都关闭了,脚本也会继续运行,或者它会运行到下一个命令行。
C:\db_backup> cd\
C:> cd Program Files (x86)/
C:\Program Files (x86)> cd WinSCP/
C:\Program Files (x86)\WinSCP> winscp.com /script=POS.txt
Searching for host...
Network error: Connection to "10.223.19.51" timed out.
C:\Program Files (x86)\WinSCP> pause
Press any key to continue . . .
这是脚本:
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane1\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane2\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane3\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane4\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane5\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane6\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane7\
open sftp://pos:[email protected]/
recv -neweronly /opt/simplepos/data/rsalphaland/*.zip C:\db_backup\POS\Lane8\
exit
答案1
你可能正在寻找option batch
命令:
option batch continue