×

winscp 同步本地文件夹到 sftp

hqy hqy 发表于2024-12-25 00:05:06 浏览41 评论0

抢沙发发表评论

参数


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 转载需授权!

分享到:


推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

 您阅读本篇文章共花了: 

群贤毕至

访客