Automated command line to be run by windows scheduler

Advertisement

Welshhop
Joined:
Posts:
6
Location:
UK

Automated command line to be run by windows scheduler

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?

Reply with quote

Merit
Guest

Re: Automated command line to be run by windows scheduler

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Automated command line to be run by windows scheduler

Add /log=path_to_log_file and inspect the log. Attach the log here is you need further help.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum