Topic "bat file not running - WinSCP"

Author Message
dollar
[View user's profile]

Joined: 2015-11-05
Posts: 1
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 Sad

------------------
my script
-------------------
Code:

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
---------------------
Code:
"C:\Program Files (x86)\WinSCP\WinSCP.exe" -script=C:\myfolder\test.txt
[/code]
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
Start with these hints:
http://winscp.net/eng/docs/troubleshooting#scripting
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