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

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
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.

Reply with quote

Advertisement

You can post new topics in this forum