07-23-2023, 10:43 AM
I would like to use first 2 arguments passed to a batch file and then append everything else to the command executed in the batch file.
Is there an easy way to do that?
// batch file
command -Duser=%1 -Dpwd=%2 {? how to pass all remaining arguments on the command line}
The batch will be executed like this
batch.bat USR PWD -Dargument1=1 -Dargument2=2
Effectively, I would like the following to be executed
command -Duser=USR -Dpwd=PWD -Dargument1=1 -Dargument2=2
Is there an easy way to do that?
// batch file
command -Duser=%1 -Dpwd=%2 {? how to pass all remaining arguments on the command line}
The batch will be executed like this
batch.bat USR PWD -Dargument1=1 -Dargument2=2
Effectively, I would like the following to be executed
command -Duser=USR -Dpwd=PWD -Dargument1=1 -Dargument2=2