You are using an out of date browser. It may not display this or other websites correctly. You should upgrade or use an alternative browser.
if statement
About this tag
The if statement tag on WindowsForum.com covers troubleshooting and usage of conditional logic in batch scripting, particularly with the if command in Windows batch files. Discussions include common issues such as set /p not capturing input correctly, improper syntax for string comparison, and debugging if statements that fail to execute expected branches. Users share solutions for correct variable expansion, quoting, and goto targets. The tag is relevant for developers and IT professionals writing or debugging Windows batch scripts.
I'm trying to create a text-based game, but I can't get passed the menu because either "set /p" isn't taking an input, or "if '%...'" isn't seeing it. This is what I'm doing to test menus, currently
:mmenu
echo Main Menu
echo Start
echo Quit
SET /P "a=Select "
if "a"=="Start" [removed:then...