Pass command-line parameters to script

Advertisement

llindholm
Joined:
Posts:
2

Pass command-line parameters to script

I'm trying to run this example script.tmp:

option batch on
option confirm off
open mysession
put %1%
exit

...using the following example syntax:

winscp.com /script=script.tmp /parameter c:\myfile.txt

...and I get the error:

File or folder '%1%' does not exist.

What am I doing wrong?

Reply with quote

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

Re: Pass command-line parameters to script

The /parameter switch was introduced in 4.2.2 beta. I suspect you are using earlier version.
_________________
Martin Prikryl

Reply with quote

Advertisement

You can post new topics in this forum