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.
  1. T

    Windows 7 [SOLVED i think..] set /p Not working properly, or If statement not working

    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...
Back
Top