You don't get a logical OR with the batch IF test.
You don't get a logical AND either, but you can mimic this by using two IF tests on one line like so
Mimic IF exist file1 AND if exist file2 THEN do_something (which doesn't work in batch):
IF exist file1 if exist file2 do_something
You see how the second IF will only be executed "if" the first one evaluates as true?
Well, you can use De Morgan's laws to turn a chain of IF NOTs into the equivalent of OR tests
Mimic IF exist file1 OR if exist file2 THEN do_something (which doesn't work in batch):
set flag=true
IF NOT exist file1 IF NOT exist file2 set flag=false
if %flag%=="true" do_something
If file1 exists, the first IF NOT test will fail, and the second one will not be executed. the variable %flag% will not be changed, and will stay as "true". This satisfies the OR condition because file1 exists.
If file1 does not exist, the first IF NOT test will succeed, and the second one will be executed. If file2 exists, the second IF NOT test will fail, and the %flag% will not be changed, and remains as "true". This satisfies the OR condition because file2 exists.
if file1 does not exist, the first IF test will succeed, and the second IF test will then be executed. If file2 does not exist either, the second test will succeed, and the variable %flag% be changed to "false". Thus the OR test fails because neither file exists.
The problem is that the above way of doing it uses 3 lines whereas this only uses 2 lines:
if exist file1 do_something
if exist file2 do_ something
However, you can chain a lot of IF NOTS in one line, where the savings of lines will be greater.