By adding dbenham to the answer, you can emulate both logical operators (AND, OR) using a combination of if
and goto
.
To check condition 1 AND codition2:
if <condition1> if <condition2> goto ResultTrue :ResultFalse REM do something for a false result goto Done :ResultTrue REM do something for a true result :Done
To check condition 1 OR codition2:
if <condition1> goto ResultTrue if <condition2> goto ResultTrue :ResultFalse REM do something for a false result goto Done :ResultTrue REM do something for a true result :Done
Labels, of course, are arbitrary, and you can choose their names as long as they are unique.
source share