Topic "How to write script for SSL FTP connection"

Author Message
ttian

Guest


open ftp://user:1password@ftpsite.com
waiting for welcome message
connection failed
connection failed
policy requires SSL


assume the command line is incorrect.
Advertisements
ttian

Guest


here is the script:

winscp ftp://user:password@myftp.com /explicitssl
option batch abort
option confirm off
option transfer binary
put c:\test\*
close
exit

the site will connected, after it nothing going on. (from "option batch abort" below nothing runs)

please help! thank you!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
ttian wrote:
here is the script:

winscp ftp://user:password@myftp.com /explicitssl
option batch abort
option confirm off
option transfer binary
put c:\test\*
close
exit

What kind of script is this? While the first line is Windows command (to run WinSCP), the rest are WinSCP commands. You cannot combine these in a single file/script.

Please start again with:
http://winscp.net/eng/docs/scripting
http://winscp.net/eng/docs/guide_automation
_________________
Martin Prikryl
Guest




Hi Prikryl,

Thank you for your reply. The actual script as below:

winscp ftp://user:password@myftp.com /explicitssl
option batch abort
option confirm off
option transfer binary
put c:\test\*
close
exit


when I run it, it shows the site connects, and then stop there, which means the rest of commands won't run. I'm kind of stuck here.

Please help! Thanks again!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
First, I already suggested you that you cannot combine Windows command (to run WinSCP) and WinSCP commands in one script. What obviously your script is doing. Second, you did not answer my question. What kind of script the above is? Is is a .bat file? If it is, make sure you move the remaining commands to a WinSCP script file and reference the file from WinSCP command-line. For that refer to the links I've posted earlier.
_________________
Martin Prikryl
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