Batch not-equal (inequality) operator

ripper234 picture ripper234 · Sep 14, 2009 · Viewed 421.2k times · Source

According to this, !==! is the not-equal string operator. Trying it, I get:

C:\> if "asdf" !==! "fdas" echo asdf
!==! was unexpected at this time.

What am I doing wrong?

Answer

Frank Bollack picture Frank Bollack · Sep 14, 2009

Try

if NOT "asdf" == "fdas" echo asdf