1
在安排脚本之前,有必要检查它的工作原理。所以从Command Prompt
我刚刚运行我的批处理文件。在WinSCP脚本中选择FTP协议
The server rejected SFTP connection, but it listens for FTP connections. Did you want to use FTP protocol instead of SFTP? Prefer using encryption.
如上图所示,我已指定它是FTP文件的协议。但它没有帮助。
到目前为止,我抬头一看:
- https://winscp.net/eng/docs/message_server_rejected_sftp_listens_for_ftp
- https://winscp.net/eng/docs/ui_login
,它工作正常上的FileZilla FTP作为。因此,我可以消除以下可能性:
- 服务器意外关闭网络连接;
- 网络错误:连接被拒绝;
- 网络错误:由对等方重置连接;
- 网络错误:连接超时。
这里是我的.bat
供参考:
C:\Program Files (x86)\winSCP\winSCP.com" /script="C:\test\Test.txt
而且.txt
:
option batch abort
option confirm off
open ***.**.**.**
lcd C:\Transfer\ToABCTest\
get -delete /test_edi_in/*.txt
close
exit
非常感谢你!希望你有很棒的假期! :) –