I need to create a windows batch script where I need to pass a few command-line arguments. These arguments may appear in in any order, but the script should pick them up properly based on the argument name. E.g.:
<scriptname> -age <agevalue> -gender <gender>
<scriptname> -gender <gender> -age <agevalue>
The script can be called in any of the two above ways but the age and gender should be properly picked up and assigned to variables. The arguments can be identified by the switch before them - i.e., -age , -gender, etc.
Can someone please give me an example of identifying this internally ?