how can i pass arguments to .bat with /script option

Advertisement

mani
Joined:
Posts:
1

how can i pass arguments to .bat with /script option

my problem is -
the batch file which i am calling needed to be passed an argument.
suppose there is a bat file which i am passing to WinSCP3.exe as-:

WinSCP3.exe /console /script="Call.bat"
this is okay.

the problem is i want to pass argument to that Call.bat
WinSCP3.exe /console /script="Call.bat LogAug16"

something like this.But it,s not working.

the Call.bat contains-:

open example@rac.com
option transfer text
put c:\logs\%1 /home/windows
close
exit

if somebody knows any other way of passing the arg to bat file via winscp

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: how can i pass arguments to .bat with /script option

WinSCP script does not allow arguments. However you can make a batch with arguments to create temporary WinSCP script file.

Reply with quote

decunde
Guest

arguments

If does not accept arguments I did not get the meaning for the "parameter". Can someone explain "parameter"?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: arguments

decunde wrote:

If does not accept arguments I did not get the meaning for the "parameter". Can someone explain "parameter"?
The post you react to is more than 3 years old, there was no /parameter then.

See documentation to learn how to use /parameters.

Reply with quote

Advertisement

You can post new topics in this forum