Checking if a folder exists using a .bat file [closed]

I would like to be able to check if a certain folder (FolderA) exists and if so, for a message to be displayed and then the batch file to be exited.

If FolderA does not exist, I would then like to check if another folder (FolderB) exists. If FolderB does not exist, a message should be displayed and the folder should be created, and if FolderB does exist, a message should be displayed saying so.

Does anybody have any idea on the code I could simply use on notepad to create a batch file to allow me to do this?

All of this needs to be done in one .bat file.

2 Answers
2

Leave a Comment