Batch Script Creating Folders
Creating Folders
The creation of a folder is done with the
md
(Make directory) command.
mkdir [drive:]path
md [drive:]path
Examples
Let’s look at some examples on how to use the md
command.
The following command will create a directory called test in your current directory.
md test
The follow command will create a directory called test in the C drive.
md C:\test
If there are spaces in the folder name, then the folder name should be given in quotes.
md "Test A"
The following command creates directories recursively:
mkdir \a\b\c
and is the same as issuing the following set of commands:
mkdir \a
chdir \a
mkdir b
chdir b
mkdir c