views:

23

answers:

1

Is there an easy way to detect options/switches passed in to a batch file via the command line? I'm looking for something along the lines of sh's and bash's getopts.

+2  A: 

No, there isn't.

(The batchfile only sees %0, %1, %2, etc. and %*, plus variations such as %~d0, %~f1, %~x2 etc.)

pipitas
After reading the superuser question you posted in your answer, that made me think to check robvanderwoude.com and I didn't find anything... if there were an easy way to do it, it would be on http://www.robvanderwoude.com/parameters.php. Thanks.
Christopher Parker