When using IF in a BAT or CMD command to test keyboard input, if the input is a space, it gives an error!
For example:
:int
@ECHO off
set pass=0
set /P pass=请输入:
if %pass%==z goto end
goto INT
:end
pause
exit
If you enter a space when running it, it will say “goto was unexpected at this time”
[ Last edited by lzwqdbr on 2007-7-1 at 03:55 PM ]
For example:
:int
@ECHO off
set pass=0
set /P pass=请输入:
if %pass%==z goto end
goto INT
:end
pause
exit
If you enter a space when running it, it will say “goto was unexpected at this time”
[ Last edited by lzwqdbr on 2007-7-1 at 03:55 PM ]
