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
非常感謝你!希望你有很棒的假期! :) –