CMD Master
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 (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.

Try the command

Try creating a new folder!

Build the command
mkdir
pathThe name or path of the directory to create. Use backslashes for nested paths.
Terminal
C:\Users\Student>mkdir MyFolder

Real-World Examples

Create a single folder:

Terminal
Directory of C:\Users\Student 04/11/2026 08:20 AM <DIR> . 04/11/2026 08:20 AM <DIR> .. 04/11/2026 08:20 AM <DIR> Documents 04/11/2026 08:20 AM <DIR> Downloads 04/11/2026 08:20 AM <DIR> Desktop 04/11/2026 08:20 AM 95 welcome.txt 04/11/2026 08:20 AM 13 file1.txt 2 File(s) 3 Dir(s)
C:\Users\Student>dir

Create a nested directory structure:

Terminal
Directory of C:\Users\Student\Projects 04/11/2026 08:20 AM <DIR> . 04/11/2026 08:20 AM <DIR> .. 0 File(s) 0 Dir(s)
C:\Users\Student>dir Projects

Knowledge Check

1 / 2

What does the mkdir command do?

References

These documentation links provide authoritative details for the commands used in this article.

Up Next

How to Copy a File in CMD with copy

Copy a file or a wildcard set in Command Prompt. Learn copy vs xcopy, overwrite prompts, and the /y switch.