You can't technically check if a folder exists in DOS/Windows, but you can check if a file exists.
Code:
IF EXIST "c:\Program Files\Test\executable.exe" GOTO runexe
Rem Else code goes here
GOTO exedone
:runexe
Rem code to run the program goes here
:exedone
If you want them in the order you specified, use IF NOT EXIST. (Capitalization doesn't matter either; I just used it for emPHAsis. )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.