What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The Windows Command Prompt command for creating a folder is:

mkdir FolderName

You can also use md, which Microsoft documents as the equivalent command:

md FolderName

The folder is created in the current directory unless you provide a different path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Open Command Prompt

These instructions apply to Windows Command Prompt, commonly opened by searching for cmd in the Start menu. They are not instructions for a Linux or macOS terminal.

#1 Best Overall
Lexar D40E 128GB Dual USB 3.2 Gen 1 Type-C Jump Drive, Champagne Silver
  • USB-C 2-in-1 storage OTG: The Lexar JumpDrive Dual Drive D40E features USB Type-A and Type-C connectors in a slim, portable form factor for easy device compatibility
  • Transfer speeds up to 100MB/s: Based on internal testing, performance may vary depending upon the host device, interface, and usage conditions. 1MB=1,000,000 bytes
  • Plug and Play: Widely compatible with USB Type-C smartphones, tablets, laptops, Macs, and traditional Type-A devices, no software installation required. The 360° swivel design allows for easy switching between connectors without the hassle of losing a cap
  • Durable & Compact: The Lexar D40E USB memory stick features a metal enclosure, withstands temperatures from 0° to 50° C (32°F to 122°F), and is lightweight at 26g with dimensions of 70.4 x 16.9 x 11.7mm
  • Security & Warranty: Securely protects files using an advanced security software solution with 256-bit AES encryption. Backed by a Lexar 3-year limited warranty

Create a folder in the current directory

First, look at the path shown before the > prompt. For example:

C:UsersAlex>

Run:

mkdir Documents

This creates the folder at C:UsersAlexDocuments. The username in this example is illustrative and will differ on other computers.

To check the current location before creating a folder, use:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd
mkdir TestFolder

Microsoft documents cd without parameters as a way to display the current drive and directory.

Create a folder at a specific location

Use an absolute path when you want the destination to be explicit:

mkdir C:TempReports
md D:Backups2026

A relative path, such as Reports, is interpreted from the current directory. An absolute path, such as C:Reports, includes the drive and complete location. A path beginning with a backslash, such as Reports, refers to the root of the current drive.

mkdir Reports
mkdir C:Reports
mkdir Reports

Check the drive letter and spelling carefully before running a command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Create a folder with spaces in its name

Put the complete folder name or path in double quotation marks:

Rank #2
SANDISK 128GB Ultra Flair, USB-A Flash Drive, Up to 150MB/s Read Speeds
  • High-speed USB 3.0 performance of up to 150MB/s(1) [(1) Write to drive up to 15x faster than standard USB 2.0 drives (4MB/s); varies by drive capacity. Up to 150MB/s read speed. USB 3.0 port required. Based on internal testing; performance may be lower depending on host device, usage conditions, and other factors; 1MB=1,000,000 bytes]
  • Transfer a full-length movie in less than 30 seconds(2) [(2) Based on 1.2GB MPEG-4 video transfer with USB 3.0 host device. Results may vary based on host device, file attributes and other factors]
  • Transfer to drive up to 15 times faster than standard USB 2.0 drives(1)
  • Sleek, durable metal casing
  • Easy-to-use password protection for your private files(3) [(3)Password protection uses 128-bit AES encryption and is supported by Windows 7, Windows 8, Windows 10, and Mac OS X v10.9 plus; Software download required for Mac, visit the SanDisk SecureAccess support page]
mkdir "Project Files"
mkdir "C:UsersAlexDocumentsClient Reports"

Without quotes, a command such as mkdir Project Files can be parsed as multiple arguments rather than one folder name. Quote the entire path, not just one component.

Change location before creating the folder

Use cd to move to the target directory:

cd Documents
mkdir Work

For a complete path:

cd C:UsersAlexDocuments
mkdir Work

When changing both the drive and directory, use /d:

cd /d D:Projects
mkdir Archive

The /d option is important when moving from one drive to another. Other useful navigation commands include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd ..

This moves up one directory. To return to the root of the current drive, use:

cd

Create nested folders in one command

With normal Command Prompt command extensions enabled, mkdir can create intermediate directories:

mkdir C:ProjectsWebsiteAssetsImages

If the parent directories do not exist, CMD normally creates the directory tree. Microsoft says command extensions are enabled by default, but they can be disabled in some environments.

If extensions are disabled, create each level separately:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
md C:Projects
md C:ProjectsWebsite
md C:ProjectsWebsiteAssets
md C:ProjectsWebsiteAssetsImages

Create several folders in one command line

Use && to run each following command only if the previous command succeeds:

Rank #3
2 Pack 64GB USB Flash Drive USB 2.0 Thumb Drives Jump Drive Fold Storage Memory Stick Swivel Design - Black
  • What You Get - 2 pack 64GB genuine USB 2.0 flash drives, 12-month warranty and lifetime friendly customer service
  • Great for All Ages and Purposes – the thumb drives are suitable for storing digital data for school, business or daily usage. Apply to data storage of music, photos, movies and other files
  • Easy to Use - Plug and play USB memory stick, no need to install any software. Support Windows 7 / 8 / 10 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, compatible with USB 2.0 and 1.1 ports
  • Convenient Design - 360°metal swivel cap with matt surface and ring designed zip drive can protect USB connector, avoid to leave your fingerprint and easily attach to your key chain to avoid from losing and for easy carrying
  • Brand Yourself - Brand the flash drive with your company's name and provide company's overview, policies, etc. to the newly joined employees or your customers
mkdir January && mkdir February && mkdir March

For different destinations:

mkdir C:Work && mkdir D:Backup

This is useful in scripts and batch files, but it is not necessary when creating one ordinary folder.

Verify that the folder was created

Do not rely only on CMD returning to the prompt. List the destination with:

dir

To inspect a particular directory:

dir C:UsersAlexDocuments

You can also try changing into the new folder:

cd C:UsersAlexDocumentsProjects

If the command succeeds, the prompt changes to that directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Common problems and fixes

The folder already exists

Running mkdir for an existing folder typically displays a message saying that the directory or file already exists. It does not create a second folder with the same name. Exact wording can vary by Windows version, language, and context.

A file with the same name also prevents a folder from being created at that path. Names that differ in spacing or punctuation may be separate paths.

Access is denied

You normally do not need administrator privileges when creating folders in locations where your account has write permission, such as your Documents folder. Protected locations, including parts of C:Windows and C:Program Files, may require elevation.

  1. Try the command normally first.
  2. If access is denied, choose a user-writable location or open Command Prompt as administrator only when the task genuinely requires it.
  3. Do not disable security controls simply to create a folder.

Account rights, folder permissions, organization policy, security software, and drive state can all affect the result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Path not found or invalid syntax

Check for:

  • Missing quotation marks around paths containing spaces.
  • An incorrect drive letter or spelling.
  • Unbalanced quotation marks.
  • Incorrect slash direction.
  • Forbidden or shell-sensitive characters.
  • Invisible or nonstandard characters copied into the command.

Start with a simple test:

mkdir TestFolder

Then add the drive, parent folders, and folder name one part at a time.

Rank #4
SIMMAX 32GB Memory Stick USB 2.0 Flash Drives Swivel Thumb Drive Pen Drive (32GB Purple)
  • GOOD VALUE PACKAGE - 1 Pack 32GB Memory Stick USB 2.0 Flash Drives with great cost performance and high quality.
  • BIG CAPACITY - The available capacity: 29.10GB-29.8GB, You can save the data of movies, music, photos, designs, programs, manuals, handouts in a high speed.Good performance in digital data storing, transferring and sharing with families, friends, workmates, clients and machines.
  • EASY TO USE & PLUG AND WORK - Support windows 7 / 8 / 10 / Vista / XP / 2000 / ME / NT Linux and Mac OS, Compatible with USB2.0 and below.
  • TWISTTURN DESIGN & EASY CARRY - The metal clip rotates 360° round the ABS plastic body which with rubber oil skin feeling finish. The capless design can avoid lossing of cap, and providing efficient protection to the USB port.
  • WARRANTY & SUPPORT - SIMMAX logo is laser printed on the USB connector surface, our products are of good quality and we promise that any problem about the product within one year since you buy.

Special characters in folder names

CMD treats characters such as &, <, >, |, ^, and ! as syntax or operators in different contexts. Prefer letters, numbers, spaces, hyphens, and underscores:

mkdir "Project_2026-08"

Quoting does not make every special-character combination safe in every CMD context; complicated names may require escaping. Avoid names such as A&B in beginner commands.

Mapped or network drives are unavailable

A mapped drive such as Z: may not appear in every Command Prompt, particularly in an elevated prompt or under another account. Availability depends on the user session, credentials, mapping, and network connection. Test with a known local path if a network path fails.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Long paths

Do not assume one universal path-length limit. Microsoft notes that the maximum path length is determined by the file system, while Windows configuration, application support, APIs, and policy can also affect behavior.

Create a folder from a batch file

The same command works in a .bat or .cmd file:

@echo off
mkdir "%USERPROFILE%DocumentsReports"

For a variable path, quote the variable so spaces are handled correctly:

set "Target=C:WorkReports"
mkdir "%Target%"

A batch file can check whether the command reported a failure:

@echo off
mkdir "C:WorkReports"
if errorlevel 1 (
    echo Folder creation failed.
    exit /b 1
)
echo Folder created or already present.

The exact result and error code can depend on the environment, so scripts that need strict validation should also verify the resulting directory.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

CMD quick reference

Purpose Command
Create a folder mkdir FolderName
Use the shorter equivalent md FolderName
Create a folder with spaces mkdir "Project Files"
Show the current directory cd
Change directory cd Path
Change drive and directory cd /d D:Path
Move up one level cd ..
List folder contents dir
Show mkdir help mkdir /?
Chain successful commands mkdir A && mkdir B
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

CMD versus PowerShell

This guide is specifically for Windows Command Prompt. PowerShell also accepts mkdir as an alias, but its syntax, quoting behavior, objects, and scripting conventions differ. Do not assume every CMD example behaves identically in PowerShell, Git Bash, WSL, or a macOS/Linux shell.

Best Value
IMEASON Swivel Design 16GB USB Flash Drive with Keychain, USB 2.0 Portable Thumb Drive Memory Stick, FAT32 Format Flashdrive for Data Storage, Photos, Music, Files (Black, 16 GB)
  • 【16GB Flash Drive】USB flash drives with 16GB capacity, meet your needs of daily use on work, school, home and travelling for photos, music, videos, files storage and transfer. IMEASON thumb drives can be used to store different files, easy to data backup.
  • 【Metal Swivel Cap Design】USB thumb drive is metal swivel cover provides extra protection for the usb thumbdrive connector, no usb drive cap to lose; keychain design makes it easier to carry without worrying lose it.
  • 【Wide Compatibility】USB drive supports Windows 7/8/10/11 / Vista / XP / Unix / 2000 / ME / NT Linux and Mac OS, also Supports USB 2.0 and 1.1 ports. USB Stick support TV, desktop, notebook computer, car, audio and other device. The USB Memory Stick is your great data storage and transfer companion with traveling and working.
  • 【Easy to use】usb memory stick is plug and play without any software installation. Just simply plug the Flashdrive into the port of your USB-compatible devices such as computer, laptop to start data storage or transmission.
  • 【What You Get】16 GB USB Flash Drive Thumb Drive, The default format of the usb storage flash drive is FAT32.

Get help inside CMD

To display the command’s built-in syntax and options, run:

mkdir /?

You can also use:

md /?
cd /?

Microsoft’s documentation covers md/mkdir, cd, and cmd for Windows 10, Windows 11, supported Windows Server releases including Windows Server 2025, and other listed Windows environments. Syntax is broadly stable, but permissions and exact error messages can vary.

Microsoft Learn: md and mkdir
Microsoft Learn: cd
Microsoft Learn: cmd

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

What is the CMD command to create a folder?

Use mkdir FolderName. The equivalent shorter form is md FolderName.

How do I create a folder on another drive?

Use cd /d D:Path to switch drives and directories, then run mkdir FolderName, or provide the full destination path directly.

Do I need administrator privileges?

Usually not for locations where your account can write, such as your Documents folder. Protected locations may require an elevated Command Prompt.

Does mkdir create files too?

No. mkdir creates directories only; creating a text file requires a separate CMD command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.