Solved Specifying Not equal to in Batch

July 2, 2012 at 22:14:48
Specs: Windows XP
I need to mention

if %Var1% <> A echo "It is not equal to A"

But it doesn't seems working. The issue is with 'not equal thing <>' Can please some one help??

See More: Specifying Not equal to in Batch

Report •

July 2, 2012 at 22:29:47
✔ Best Answer
if %var1% NEQ A echo NOT

the usual syntax of <> is not used due to piping issues. from command prompt, see: if /?. ps: also good to use quotes to help defeat hidden spaces:
if "%var1%" neq "A" echo NOT

Report •
Related Solutions

Ask Question