2016-12-29 97 views
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.

圖片:
My login window on WinSCP: Selected FTP protocol explicitly

如上圖所示,我已指定它是FTP文件的協議。但它沒有幫助。

到目前爲止,我擡頭一看:

,它工作正常上的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 

回答

0

您可以選擇使用ftp://方案在session URL指定腳本FTP協議:

open ftp://***.**.**.** 
+0

非常感謝你!希望你有很棒的假期! :) –