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
close
exit
保存。
然后执行cmd
"c:\Program Files\WinSCP\WinSCP.exe" /console /script=c:\willrun.txt
具体怎么将这句命令加入定时任务,谷歌一下你就知道。