Name
md or mkdir
Synopsis
Create a new directory (folder).
Syntax
md [drive:]pathmkdir [drive:]path
Description
Windows XP, like its predecessors, uses a hierarchical directory structure to organize its filesystem. On any physical disk, the filesystem begins with the root directory, signified by a lone backslash.
md and mkdir accept the
following option:
-
[drive:]path Specifies the directory to create.
Examples
Create a subdirectory named harry in the current
directory:
C:\tom\dick>md harryCreate a new directory called newdir under the
c:\olddir directory:
C:\>md c:\olddir\newdirIf c:\olddir doesn’t exist, it
will be created as well.
Create two new directories, c:\rolling and
c:\stones:
C:\>md rolling stonesCreate a single new directory, c:\rolling
stones:
C:\>md "rolling stones"(Enclose directory names in quotation marks to accommodate spaces).
Notes
The
mdandmkdircommands are functionally identical.You can also create new folders in Windows Explorer by going to File → New → Folder.
You may indicate an absolute or relative path for the path parameter. When absolute, the new directory is created as specified from the root directory. When relative, the directory is created in relation to the current directory.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access