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

Author Message
[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 s
option transfer binary
get *.bak c:\
# 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 s -explicit
option transfer binary
get *.bak c:\
# 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

WinScp2.jpg (62.08 KB) [Download]

Description: (none)

WinScp1.jpg (62.76 KB) [Download]

Description: (none)

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

You can post new topics in this forum


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!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License