Topic "Automated command line to be run by windows scheduler"

Author Message
Welshhop
[View user's profile]

Joined: 2014-03-31
Posts: 6
Location: UK
Hi,
I am looking for help on getting a command line script written which will connect to our SFTP site and copy any new or updated files from SFTP to our local drive.
I currently have the following which works for a handful of files but then stops and i am not sure why.

cd c:\Program Files (x86)\winscp
winscp.exe /console /Command "option batch abort" "option confirm off" "open sftp://Username:Password@IP:Port/" "cd /QlikView/" "option transfer binary" "get *.* C:\VeoliaData\" "close" "Exit"

the above should go to the QlikView directory and transfer everything from it to the local directory (C:\VeoliaDate\)

Can anyone help please?
Merit

Guest


Try this

cd /d C:\Program Files (x86)\WinSCP
winscp.exe /console /Command "option confirm off" "open ftp://UserName:Password@mysite.com -explicitssl" "cd QlikView" "option transfer binary" "get *.* C:\VeoliaData\" "close" "Exit"


Welshhop wrote:
Hi,
I am looking for help on getting a command line script written which will connect to our SFTP site and copy any new or updated files from SFTP to our local drive.
I currently have the following which works for a handful of files but then stops and i am not sure why.

cd c:\Program Files (x86)\winscp
winscp.exe /console /Command "option batch abort" "option confirm off" "open sftp://Username:Password@IP:Port/" "cd /QlikView/" "option transfer binary" "get *.* C:\VeoliaData\" "close" "Exit"

the above should go to the QlikView directory and transfer everything from it to the local directory (C:\VeoliaDate\)

Can anyone help please?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Add /log=path_to_log_file and inspect the log. Attach the log here is you need further help.
_________________
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