首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > windows >

winscp在windows上批处理通过SSH端口下传文件

2012-07-15 
winscp在windows下批处理通过SSH端口上传文件要执行的命令保存成文件willrun,内容:option confirm offopen

winscp在windows下批处理通过SSH端口上传文件
要执行的命令保存成文件willrun,内容:

option confirm off

open user:pwd@host1
put c:\test.txt /root/tmp
close

open user:pwd@host2
put c:\test.txt /root/tmp
close

open user:pwd@host3
synchronize remote c:\tmp /root/tmp -delete-----如果在目标机器存在,则加delete参数
close

exit





保存。





然后执行cmd

"c:\Program Files\WinSCP\WinSCP.exe" /console /script=c:\willrun.txt

热点排行