The issue of connecting to SFTP server via script.Urgent!!!

Advertisement

wchunhao2003@163.com
Joined:
Posts:
1

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

WinScp2.jpg

WinScp1.jpg

Reply with quote

Advertisement

JeroenE
Joined:
Posts:
9
Location:
The Netherlands

Can you connect to the server at all? Have you tried connecting manually in the GUI (without a script) to see what happens?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,453
Location:
Prague, Czechia

Re: The issue of connecting to SFTP server via script.Urgent!!!

Can you connect to the server anyhow? Using WinSCP GUI or using any other FTP client?

Reply with quote

Advertisement

You can post new topics in this forum