Back to Blog
Arnošt Havelka

The MKDIR Command

Learn how to create directories from the command line.

Start Interactive Lesson
The MKDIR Command

The MKDIR Command

The mkdir (or md) command lets you create new directories right from the command line. Whether you need a single folder or a nested directory structure, mkdir has you covered. It's one of the essential building blocks for organizing files on your system.

Usage:mkdir
[path]
path
The name or path of the directory to create. Use backslashes for nested paths.

Real-World Examples

Create a single folder:

Command Prompt
Volume in drive C has no label. Directory of C:\Users\Admin 05/23/2024 10:00 AM <DIR> Documents
C:\Users\User>dir

Create a nested directory structure:

Command Prompt
The system cannot find the path specified.
C:\Users\User>dir Projects

Knowledge Check

1 / 2

What does the mkdir command do?

References

These Microsoft Learn and Windows documentation links provide authoritative details for the commands used in this article.