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

Author Message
wchunhao2003@163.com
[View user's profile]

Joined: 2016-09-13
Posts: 1
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 (62.08 KB) [Download]

Description: (none)

WinScp1.jpg (62.76 KB) [Download]

Description: (none)

JeroenE
[View user's profile]

Joined: 2014-02-13
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?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24991
Location: Prague, Czechia
Can you connect to the server anyhow? Using WinSCP GUI or using any other FTP client?
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License