Topic "found example code, but it won't let me connect"

Author Message
[View user's profile]

Joined: 2014-06-05
Posts: 3
Location: Germany
hello everyone
i found some example code on the internet, but it won't let me connect to the SFTP.

i've been using FileZilla for SFTP transfers, but am now in the need for some automated scripting. so i came across WinSCP. every day i connect to a remote folder and there are just under 100 files. and every day i'm downloading a dozen from there, and that list of files i need varies by day of week. so i want to automate that Smile

i found this thread here and then copied the script mentioned in there

but the shell tells me host "username" does not exist. so something must be wrong in the syntax that i copied from there.

this is my script:
# Connect to the host and login using password
[b]open s[/b]
# Change the remote directory
cd remotetargetpath
# get all the files in the remote directory and download them to a specific local directory
get *example_pattern*.csv localtargetpath
# Close and terminate the session

what am i doing wrong?
i tried the documentation/help on here, searched for the "open" command, but can't find syntax Sad
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26711
Location: Prague, Czechia
It should be open s (note the "at" sign).

Martin Prikryl
[View user's profile]

Joined: 2014-06-05
Posts: 3
Location: Germany
many thanks!

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