Purpose: | Create a subdirectory |
Format: | MD [/C /D /N[et] /S] path... |
or
MKDIR [/C /D /N[et] /S] path...
path The name of one or more directories to create.
See also: RD.
Internet: Can be used with FTP Servers.
Usage:
MD and MKDIR are synonyms. You can use either one.
MD creates a subdirectory anywhere in the directory tree. To create a subdirectory from the root, start the path with a backslash [\]. For example, this command creates a subdirectory called MYDIR in the root directory:
md \mydir
If no path is given, the new subdirectory is created in the current directory. This example creates a subdirectory called DIRTWO in the current directory:
md dirtwo
To create a directory from the parent of the current directory (that is, to create a sibling of the current directory), start the pathname with two periods and a backslash [..\].
Windows limits the maximum length of the subdirectory name. See Directories and Subdirectories for details.
When creating a directory on an LFN drive, you must quote any path which contains white space or special characters.
If MD creates one or more directories, they will be added automatically to the extended directory search database unless the /N option is specified.
You can create directories on FTP servers. For example:
md ftp://ftp.abc.com/data/index
MD sets two internal variables:
%_md_dirs | The number of directories created |
%_md_errors | The number of errors |
Options:
e | Don't display non-fatal errors. (Note that a /Ne alone will still update the extended directory search database.) |
t | Don't update the extended directory search database. (This is the same as /N with no options.) |
md /s \one\two\three
For compatibility with CMD, /S becomes the default if you enable TCC-RT extensions with the /X switch on the TCCstartup command line. See Command Line Options for details on /X.