My “if” statement doesn’t work. I receive the value from user using the following command:
set /p MAP=Enter map filename:
Then I use “if” to do some work:
:mylabel
if %MAP% neq "" ( do something1... )
if %MAP% equ "" ( do something2... )
pause
goto :eof
The first “if” I use when something was typed by user, the second one – if nothing was typed by user. The code works if a user types something, if he just presses enter (does not type anything), the second if does not work (nothing executes). I don’t understand why does the second if-statement work?