感谢Martin Prikryl修正我能够连接,这里是我做过什么:
创建与winscp.com命令“connection.txt”的文本文件:从
# Automatically abort script on errors
option batch abort
# Disable overwrite confirmations that conflict with the previous
option confirm off
# Connect with username and password
open ftp://username:[email protected]:port -implicit -certificate="aa:aa:aa:aa...."
# Change local directory
lcd C:\local_working_folder
# Force binary mode transfer
option transfer binary
# Download missing files to local directory from remote
synchronize local
# Delete all remote files
rm *
# Disconnect
close
# Exit WinSCP
exit
现在命令提示符或在批处理文件中,您只需从它的安装位置调用winscp.exe即可。如果从安装媒体应该是C:\ Program Files文件\的WinSCP \ WinSCP.exe,如果从一个.zip便携版本指向的文件夹中提取您提取文件:
C:\WinSCP\WinSCP.exe /console /script="connection.txt" /log="conn.log"
然后,只需安排该批次使过程自动化。