Topic "Problem passing a parameter from .bat file to script"

Author Message
georgewolfe3

Guest


The script below works nicely to get all of the remote files that match the filter.

open ftp://username:password@host.remote.com/reports/
option confirm off
get 20160630*close*
close
exit

I want to pass the date from a .bat file. The documentation seems to say if the get command is:
get %1%*close*

and the .bat file is something like:
winscp.com /script="script.txt" /xmllog="script.log" "20160701"

the date will replace the %1%. But it doesn't work. I've tried lot of different versions of the above.
Am I using the wrong syntax, or does this approach not work?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
It's

winscp.com /script="script.txt" /xmllog="script.log" /parameter "20160701"

See https://winscp.net/eng/docs/scripting#arguments
_________________
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