I want something like this:- if %ERRORLEVEL% GEQ 1
&& %ERRORLEVEL% neq 255 GOTO Not closed by user
. But this syntax is not working.
Asked
Active
Viewed 251 times
1

Deb
- 5,163
- 7
- 30
- 45
2 Answers
1
You can use multiple if statements to simulate AND operator:
if %ERRORLEVEL% GEQ 1 if %ERRORLEVEL% neq 255 GOTO :NotClosedByUser

mihai_mandis
- 1,578
- 1
- 10
- 13
0
I guess you can also do it like this :
if %ERRORLEVEL% GEQ 1 (
if %ERRORLEVEL% neq 255 (
GOTO NotClosedByUser
)
)
So this can be easier to read, I think.

user3186610
- 83
- 7