Re:We Are Sorry to Inform You (2005)
by dan-robertson on Saturday June 18, 2022 @08:31AM
(#31789255)
This is how you do a SWITCH statement in Microsoft’s command language (for .bat files) I think.
[ Parent
| on HN ]
It does come in handy in some scenarios:
choice /c abc
goto choice%errorlevel%
:choice1
:choice2
:choice3
Or, for command-line parameters: set ops=a b c
set op=%1
for %%p in (%ops%) do if "%op%"=="%%p" goto %op%
goto usage