参数
synchronize local|remote|both [ <local directory> [ <remote directory> ] ]
https://winscp.net/eng/docs/scriptcommand_synchronize#examples
script.txt
option confirm off
# connent
open sftp://52:F123@10.13.13.13:2222/ -hostkey="ecdsa-sha2-nistp256 256 Jcz7wK07DXilX8BZ/REGpvJ4fH/sdOSJ1CV69yAap9M"
# 您的指令 1
# KA03 为本地目录, /test 为 sftp 目录
synchronize remote C:\Users\KA03\3月4日 /test
# Disconnect
close
# Exit WinSCP
exit
pause
bat 文件
cd C:\Users\admin\AppData\Local\Programs\WinSCP
"C:\Users\admin\AppData\Local\Programs\WinSCP\\WinSCP.com" /script=C:\Users\admin\AppData\Local\Programs\WinSCP\script.txt
参考
https://www.jianshu.com/p/ff719480e0ef
https://winscp.net/eng/docs/scripting
本文链接:https://www.kinber.cn/post/4318.html 转载需授权!
推荐本站淘宝优惠价购买喜欢的宝贝: