How do I display the value associated with switch A and switch B regardless of the order in which A and B was specified?
Consider the following call to batch file ParamTest.cmd:
C:\Paramtest.cmd \A valueA \B valueB
Here's the contents of C:\Paramtest.cmd:
ECHO Param1=%1
ECHO Param2=%2
ECHO Param3=%3
ECHO Param4=%4
Output:
Param1=\A
Param2=valueA
Param3=\B
Param4=valueB
I would like to be able to identify TWO values passed by their switch names, A and B, regardless of teh order in which these switches were passed
For example, if I execute the following call:
C:\Paramtest.cmd \B valueB \A valueA
I would like to be able to display
A=ValueA
B=ValueB
..and have the same output even if I called the batch file with the param order switched:
C:\Paramtest.cmd \A valueA \B valueB
How do I do this?