0

I'm simply curious as to whether or not it is possible to use any operations on the 'if not' command, namely or. The type of thing I want would be along the lines of;

if not var==(a1 || a2 || a3 || a4) goto dothis
:dothis

Or, the word 'or' being used instead of '||', I hope you know what I'm getting at. Is this possible? If so, how do I do it? Thanks in advanced,

user2960215
  • 43
  • 1
  • 4

2 Answers2

2
for %%a in (a1 a2 a3 a4) if "%var%"=="%%a" goto notdothis
:dothis

:notdothis
Magoo
  • 77,302
  • 8
  • 62
  • 84
1
if not "%var%"=="a1" if not "%var%"=="a2" if not "%var%"=="a3" if not "%var%"=="a4" echo it's not them.
foxidrive
  • 40,353
  • 10
  • 53
  • 68