Friday, April 27, 2012

MKDIR / MD - Dos Command :

It creates a new directory.
To view 'mkdir or md' command with its all possible parameters you can use following command. Its like help information to regarding that command.
mkdir/?

OR

md/?
* If command extensions are enabled MKDIR changes as follows:
* MKDIR creates any intermediate directories in the path, if needed.
Suppose that, directory 'a' does not exist then,

mkdir \a\b\c
is same as of :

mkdir a
chdir a
mkdir b
chdir b
mkdir c

If extensions are disabled then you have to type if extensions were disabled.

Syntax :

MKDIR [drive:][path]

or

MD [drive:][path]
Use 1:

mkdir a

- The above command creates a new directory called a.

Use 2:

mkdir \a\b\c

- First, it creates a new directory 'a'. After creation, it creates directory 'b'. and finally, it creates directory c. c directory which is subdirectory of b. Whereas b is a subdirectory of a.

Use 3:

md a

The above command creates a new directory called a.

Use 4:

md \a\b\c

First, it creates a new directory 'a'. After creation, it creates directory 'b'. and finally, it creates directory c. c directory which is subdirectory of b. Whereas b is a subdirectory of a.

Output :


Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

D:\DINESH > mkdir a

D:\DINESH > mkdir a\b\c

D:\DINESH > md x

D:\DINESH > md x\y\z

D:\DINESH > _

No comments:

Post a Comment