Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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?
JeroenE

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

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