The issue of connecting to SFTP server via script.Urgent!!!
Hi all,
I'm trying to download a file via Winscp with the script, but the connection could not be established.
Here is the first script as below:
# start script code
open sftp://username:password@ftps.com/
option transfer binary
get *.bak c:\
close
# end script
Then, Winscp tried to search the server, but it was failed. please see the attachment of winscp1.
Secondly, I added " -explicit" in the script, then Winscp tried to connect the server. looks like better, but it was failed again eventually. please see the attachment of winscp2.
# start script code
open sftp://username:password@ftps.com/ -explicit
option transfer binary
get *.bak c:\
close
# end script
Therefore, I'm assuming maybe there is something wrong with the setup of -explicit that is using as Encryption between c/s. Please feel free to give me any advice and suggestions.
By the way, I'm using the batch file to execute the script. And the batch file as below:
# start
winscp.exe /console /script=my_script.txt
# end
Thanks,
Bob
I'm trying to download a file via Winscp with the script, but the connection could not be established.
Here is the first script as below:
# start script code
open sftp://username:password@ftps.com/
option transfer binary
get *.bak c:\
close
# end script
Then, Winscp tried to search the server, but it was failed. please see the attachment of winscp1.
Secondly, I added " -explicit" in the script, then Winscp tried to connect the server. looks like better, but it was failed again eventually. please see the attachment of winscp2.
# start script code
open sftp://username:password@ftps.com/ -explicit
option transfer binary
get *.bak c:\
close
# end script
Therefore, I'm assuming maybe there is something wrong with the setup of -explicit that is using as Encryption between c/s. Please feel free to give me any advice and suggestions.
By the way, I'm using the batch file to execute the script. And the batch file as below:
# start
winscp.exe /console /script=my_script.txt
# end
Thanks,
Bob