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
.
No, there isn't.
(The batchfile only sees %0, %1, %2, etc. and %*, plus variations such as %~d0, %~f1, %~x2 etc.)