D
djc
IF %testvar%==yes echo yes
above works fine. If testvar is yes it echos yes. If not. nothing.
SET testvar=yes sir
IF %testvar%=="yes sir" echo yes sir
above does not work. I get: sir=="yes sir" was unexpected at this time.
SET testvar=yes sir
IF %testvar%==yes sir echo yes sir
above gives me: sir==yes was unexpected at this time.
How can I get this comparison to work? I know its the spaces because the
same construct works fine using values with no spaces.
any help is appreciated. Thanks.
above works fine. If testvar is yes it echos yes. If not. nothing.
SET testvar=yes sir
IF %testvar%=="yes sir" echo yes sir
above does not work. I get: sir=="yes sir" was unexpected at this time.
SET testvar=yes sir
IF %testvar%==yes sir echo yes sir
above gives me: sir==yes was unexpected at this time.
How can I get this comparison to work? I know its the spaces because the
same construct works fine using values with no spaces.
any help is appreciated. Thanks.