Here is my batch script file. There are 2 scenarios
@echo off set name= set /P TypeName=Name: %=% if %TypeName% == "abcd" goto correctName else goto wrongName :correctName echo Correct Name :end :wrongName echo Wrong Name :end
When I enter abcd as input, I get the 'else' is not recognized as an internal or external command, operating program or batch file
Invalid name
@echo off set name= set /P TypeName=Name: %=% if %TypeName% EQA "abcd" goto correctName if %TypeName% NEQ "abcd" goto wrongName :correctName echo Correct Name :end :wrongName echo Wrong Name :end
When I type abcd as input, I get EQA at this time unexpectedly.
Is there something wrong in my script? I missed something here
source share