在 WinSCP 脚本中选择 FTP 协议
Selecting FTP protocol in WinSCP script
在安排脚本之前,有必要检查一下它是如何工作的。所以从 Command Prompt
我只有 运行 我的批处理文件。
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
您必须在 session URL 中使用 ftp://
方案在脚本中指定 FTP 协议:
open ftp://***.**.**.**
在安排脚本之前,有必要检查一下它是如何工作的。所以从 Command Prompt
我只有 运行 我的批处理文件。
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
您必须在 session URL 中使用 ftp://
方案在脚本中指定 FTP 协议:
open ftp://***.**.**.**