@ECHO OFF IF EXIST C:\test.txt AND C:\test.exe GOTO blah :blah ECHO blah EXIT
returns the error "AND" is not a recognized...." We get the same error message using the OR command. It's possible to make it using GOTOs
@ECHO OFF IF EXIST C:\test.txt GOTO test1 ECHO test.txt does not exist GOTO exit :test1 IF EXIST C:\test.exe GOTO blah ECHO test.txt exist, test.exe does not :exit ECHO press any key to exit PAUSE>NUL :blah ECHO blah
but it is unnecessarily tedious. So can anyone help me make it somewhat easier?