3 ms·
It does come in handy in some scenarios: choice /c abc goto choice%errorlevel% :choice1 :choice2 :choice3 Or, for command-line parameters
by 4cao 4y ago
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