
Windows XP and DOS
Create a Directory or Directory Tree
SUMMARY: Use the MKDIR command at a DOS prompt or batch file to create directories.
If you need a directory or group of directories made, you may wish to create them at the Windows XP DOS prompt rather than from Explorer. Or, you may need to create a directory via a batch file.
The mkdir or md command creates a directory or directory tree at the DOS prompt. You can include a drive letter and path in the command. Examples:
mkdir c:\Projects
Creates the Projects directory underneath the root of the C:\ drive.
mkdir "c:\Projects\Status Reports\2008 Status Reports\"
Creates the directory Projects underneath the root of the C:\ drive if it does not already exists. It also creates the Status Reports subdirectory underneath if it does not already exist. Then, it creates the 2008 Status Reports sub-subdirectory. Note that directories containing spaces should be surrounded by quotes.
This command will report an error if the directory or directory tree already exists, or if a file exists that matches the name of the directory/directory tree to be created.
* To remove a directory, use the RMDIR command.
Return to the Windows XP and DOS page.
blog comments powered by Disqus
![[Home]](http://malektips2.com/graphics/logo-small.png)