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

Maxxx

I also have this issue but for a workaround you can read environment variables from inside the script.
Just set a new variable in the calling script
set WHATEVER=blahblahh

Then in script use:
cd %WHATEVER%

Regards
georgewolfe3

Problem passing a parameter from .bat file to script

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?