Most people create folders in Windows by right-clicking and selecting “New Folder.” It’s simple and works fine for everyday use.
But there’s another faster and more powerful way: using CMD (Command Prompt).
With just a single command, you can create folders anywhere on your system, automate folder creation, or even create multiple folders at once. This is especially useful for developers, IT users, and anyone who wants more control over file management.
In this guide, you’ll learn how to create a new folder using CMD step by step, including advanced tricks and real-world examples.
What is CMD?
CMD (Command Prompt) is a built-in Windows tool that allows you to interact with your computer using text commands instead of clicking icons.
With CMD, you can:
- Create folders
- Delete files
- Move directories
- Run system commands
- Automate tasks
It’s simple once you understand the basic syntax.
How to Open CMD
Before creating a folder, you need to open Command Prompt.
Method 1: Search Method
- Click Start
- Type CMD
- Click Command Prompt
Method 2: Run as Administrator
- Press Windows + R
- Type
cmd - Press Ctrl + Shift + Enter
Basic Command to Create a Folder in CMD
The Main Command
To create a folder, use:
mkdir FolderName
or
md FolderName
Both commands do the same thing.
Example 1: Create a Simple Folder
mkdir MyFolder
This creates a folder called MyFolder in your current directory.
How to Create a Folder in a Specific Location
If you want to create a folder somewhere else, you must specify the path.
Example 2: Create Folder on Desktop
mkdir C:\Users\YourName\Desktop\NewFolder
Replace YourName with your actual Windows username.
Example 3: Create Folder in Documents
mkdir C:\Users\YourName\Documents\Projects
How to Create Multiple Folders at Once
CMD allows you to create multiple folders in a single command.
Example:
mkdir Folder1 Folder2 Folder3
This creates three folders instantly.
How to Create Nested Folders (Folders Inside Folders)
You can also create subfolders in one command.
Example:
mkdir Project\Images\2026
This creates:
- Project
- Images
- 2026
- Images
Even if parent folders don’t exist, CMD will create them automatically.
How to Navigate Before Creating a Folder
Sometimes you need to move to a directory first.
Change Directory Command
cd Desktop
Then create a folder:
mkdir TestFolder
Real-World Uses of CMD Folder Creation
1. Developers Organizing Projects
Developers often create structured folders like:
- Projects
- Source Code
- Assets
- Builds
All done quickly using CMD.
2. Bulk Folder Setup
Instead of clicking repeatedly, you can create multiple folders instantly.
3. Automation Scripts
CMD commands are used in batch files to automate folder creation for workflows.
4. IT System Setup
Technicians use CMD to prepare systems with predefined folder structures.
Advanced CMD Tricks
1. Create Folder with Date Name
mkdir Backup_%date%
This creates a folder with today’s date.
2. Create Hidden Folder
mkdir HiddenFolder
attrib +h HiddenFolder
This hides the folder from normal view.
3. Create Folder with Special Name
mkdir "My New Folder"
Use quotes for names with spaces.
Pros and Cons of Using CMD for Folder Creation
Pros
- Very fast
- Works without GUI
- Supports automation
- Useful for developers and IT tasks
Cons
- Requires learning commands
- Small typing mistakes can cause errors
- Not beginner-friendly at first
Common Issues and Fixes
1. “Path Not Found” Error
Check if the directory exists before creating a folder.
2. Access Denied
Run CMD as Administrator.
3. Folder Not Created
Ensure you typed the correct path and syntax.
Frequently Asked Questions (FAQ)
1. What command creates a folder in CMD?
Use:
mkdir FolderName
2. Can I create folders anywhere?
Yes, as long as you have permission for that directory.
3. What is the difference between mkdir and md?
No difference—both work the same way.
4. Can I create folders with spaces in names?
Yes, but use quotes:
mkdir "My Folder"
5. Can CMD create multiple folders at once?
Yes, just list them in one command.
Final Thoughts
Creating folders using CMD is a simple but powerful skill that can save time and improve productivity. While most users rely on the graphical interface, CMD offers faster execution, automation potential, and greater control over file management.
Once you get comfortable with basic commands like mkdir, you can start building more advanced workflows and even automate entire folder structures with ease.
If you use Windows regularly, this is one of those small skills that quickly becomes very valuable in everyday computing.