Batch: How do you search for a variable(text) within another variable(text)? Answered
I want to use a batch file that based on user input, searches for a variable (already set) within the user input.
eg. I figured that this would work:
set /p var2=Choice:
(USER TYPES "A B C")
findstr /i /c:"%var%" %var2% OR findstr /i /c:"%var%" ^
if %errorlevel% equ 0 echo.%var% is in %var2%