Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

dollar

bat file not running - WinSCP

Hi

I'm trying to execute winscp script from a batch file. The script is to auto download files from ftp

ON testing, all thats happening is command prompt opens for a split second and closes - clearly its failing

What am i doing wrong - please help :(

------------------
my script
-------------------
option batch abort

option confirm off
open sftp://xxxxx:xxxx@xxxx.com/ -hostkey="ssh-rsa xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
get -filemask="*>=%TIMESTAMP#yyyy-mm-dd%" /source/*.zip C:\Input\Input\
exit

-------------------
my bat file
---------------------
"C:\Program Files (x86)\WinSCP\WinSCP.exe" -script=C:\myfolder\test.txt
[/code]