问题
I am having a User_file.txt
file placed at WinSCP root folder USERDATA, which I am trying to download to the given location C:\User\Local\
.
Executable- C:\Program Files (x86)\WinSCP\WinSCP.exe
Arguments - /log=c:\path\to\log\winscp.log /command "open ftp://username:password@example.com/" "get /USERDATA/User_file.txt C:\User\Local\" "exit"
I am facing below error:
No connection could be made the target machine actively refused it
Not sure what I am missing. I took reference from couple of related post on Stack Overflow.
回答1:
You want to use SFTP, but use FTP (ftp://
) protocol in the session URL.
Use sftp://
instead:
... "open sftp://username:password@example.com/" ...
WinSCP GUI can generate a correct script/command-line template for you.
来源:https://stackoverflow.com/questions/56650179/sftp-transfer-using-execute-process-task-and-winscp-in-ssis