2

If I run a Windows batch file in the following way:

myscript.bat -b test -c 789

or in the following way:

myscript.bat -c 789 -b test

What is the best way to reliably get the value of c?

1

1 Answer 1

2

how about:


IF _%1==_b echo do something with %2
IF _%1==_c echo do something with %2
IF _%3==_b echo do something with %4
IF _%3==_c echo do something with %4

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.