I have this batch script that has numerous "if statements". Here are a couple lines of what I have:
if %c%==PC exit
if %c%==pc exit
if %c%==CMD exit
if %c%==cmd exit
if %c%==MENU exit
if %c%==menu exit
if %c%==KILL exit
if %c%==kill exit
There are many more possibilities and really could use some simplifying if it is possible. So is there a way I can simplify this? Perhaps something like, if the variable c
is equal to any of these exit. Or even make the if statements case insenstitive Is this possible? Really, any way to simplify this would be awesome and could greatly reduce the size of my batch script.
A couple side notes
This code already works and does not need to be edited with the exception of condensing it.
I know there is a similar question found here, but I do not know how to apply it to my problem.