MKDIR Windows Command Guide
The Windows mkdir command allows users to easily create directories in the Windows operating system. It is a simple yet powerful command that can be used in the Command Prompt or PowerShell to organize files and folders efficiently. With mkdir, you can create multiple directories at once, set permissions, and even create nested directories. Mastering the mkdir command can help streamline your file management tasks and keep your computer well-organized.
MKDIR Syntax:
mkdir [Option] [Directory]
Options:
Option | Description |
---|---|
/A | Creates a directory with specified attributes. |
/D | Creates a directory if it does not already exist. |
/S | Creates specified directory and all parent directories. |
/V | Verbose mode, displays detailed information. |
/Q | Quiet mode, do not display any messages. |
Parameters:
Parameter | Description |
---|---|
Directory | Specifies the name and location of the directory to be created. |
MKDIR Command Samples:
Create a New Directory
mkdir NewFolder
Creates a new directory named “NewFolder” in the current location.
Create Multiple Directories
mkdir Folder1 Folder2 Folder3
Creates multiple directories named “Folder1”, “Folder2”, and “Folder3” in the current location.
Create a Nested Directory
mkdir ParentFolder\ChildFolder
Creates a nested directory structure where “ChildFolder” is within “ParentFolder”.
Create a Directory with a Space in the Name
mkdir "Directory with Space"
Creates a directory with a space in the name, enclosed in double quotation marks.
Create a Directory on a Specific Drive
mkdir D:\NewFolder
Creates a new directory named “NewFolder” on the D: drive.
Create a Directory with Relative Path
mkdir ..\RelativeFolder
Creates a new directory named “RelativeFolder” one level up in the directory structure.
Create a Hidden Directory
mkdir .hidden-folder
Creates a directory with a name starting with a dot, making it a hidden directory.
MKDIR FAQ:
How do I use mkdir in Windows?
To use the mkdir command in Windows, execute the following command:
mkdir new_directory
Can I create multiple directories at once with mkdir in Windows?
Yes, you can create multiple directories simultaneously with mkdir in Windows by specifying multiple directory names as arguments.
mkdir dir1 dir2 dir3
How can I create a directory with spaces in the name using mkdir in Windows?
To create a directory with spaces in the name using mkdir in Windows, enclose the directory name in double quotes.
mkdir "directory with spaces"
How can I create a directory within a specific path using mkdir in Windows?
You can specify the path where you want to create a directory using mkdir in Windows by providing the full path or a relative path.
mkdir C:\Path\to\create\dir
Can I create nested directories with a single command using mkdir in Windows?
Yes, you can create nested directories with a single command using the -p option with mkdir in Windows.
mkdir -p parent_directory\child_directory
How can I view a list of available options for the mkdir command in Windows?
To view a list of available options for the mkdir command in Windows, you can use the /? option.
mkdir /?
Applications of the MKDIR Command
- Create a new directory
- Create multiple directories at once with specified names
- Create nested directories (directories within directories)
- Create directories with specific permissions/attributes
- Create directories at specified paths