感谢马丁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:password@host: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"
然后只需安排批次就可以自动执行此过程。