Knowledge Walls
John Peter
Pune, Maharashtra, India
Things to Know [cont'd]
Directory is Exist in Things to Know of MS-DOS Commands
7389 Views
How to check directory is exist or not exist in MS DOS batch file? 
EXIST and NOT EXIST are used to check directory is exist or not exist in the batch file. In below example explained both exist and not  exist directorys using IF statement.

Syntax
EXIST directory_path
NOT EXIST directory_path
Is directory exist
IF EXIST "updated/examples" GOTO DONT_CREATE_DIR
  statements
:DONT_CREATE_DIR
Is directory not exist
IF NOT EXIST "updated/examples" GOTO DONT_CREATE_DIR
  statements
:DONT_CREATE_DIR
Next Topics
Next lessons of current book.
Things to Know of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Decision making of MS-DOS Commands
Previous Topics
Previous lessons of current book.
Things to Know of MS-DOS Commands
Best Lessons of "MS-DOS Commands"
Top lessons which are viewed more times.
Arithmetic Operators of MS-DOS Commands
Arithmetic Operators of MS-DOS Commands
Relational Operators of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
String manipulation of MS-DOS Commands
Things to Know of MS-DOS Commands
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details