Skip to content

Instantly share code, notes, and snippets.

@danishi
Created March 19, 2022 14:47
Show Gist options
  • Select an option

  • Save danishi/75f1950e8e19fc7ad7cff1bd4f527ac9 to your computer and use it in GitHub Desktop.

Select an option

Save danishi/75f1950e8e19fc7ad7cff1bd4f527ac9 to your computer and use it in GitHub Desktop.
CASE expression in a batch file
@echo off
set Case=?
set /p Case=?
:Select
goto Case%Case%
:Case1
echo case1
goto CaseEnd
:Case2
echo case2
goto CaseEnd
:Case3
echo case3
goto CaseEnd
:Case?
echo case?
goto CaseEnd
:CaseEnd
pause > nul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment