Going old school here. . .
To check for the presence of a directory (or folder) you can use the IF EXIST statement. For example, to test for C:TEMP and then change to C:TEMP if it exists, else create the directory and change to it, use the following batch file:
IF NOT EXIST C:TEMP GOTO MAKEDIR
One thought on “Testing If a Directory Exists from a Batch File”
It won't work if c:temp is a file or the current directory is not on disk c: