I have created a nested if statement that just performs very simple tasks. Here is the code below:
@ECHO OFF
SET ANS=%1
IF "%ANS%"=="" ( ECHO You Entered Nothing
)
IF /i %ANS%==Y ( ECHO You entered Yes
)
IF /i %ANS%==N ( ECHO You entered NO
)
IF %ANS%==? ( ECHO I am confused
)
My problem is that when "%ANS%"=="" i get a "( was unexpected at this time" after echoing the message i have provided. Everything else works as planned but i am not sure why i am getting this message.