Hello friends! 👋
Have you ever tried creating a folder named CON, AUX, or NUL in Windows, only to receive an error message?
Many people think it's a bug or a hidden Windows secret, but the real reason is much more interesting. These names are reserved system device names that have existed since the early days of DOS and are still recognized by modern versions of Windows for compatibility.
In this guide, you'll learn why these names are blocked, how Windows handles them, and what happens if you try to create them using Command Prompt (CMD).
💡 My Experience
The first time I tried creating a folder named CON, Windows refused and displayed an error. Like many beginners, I thought something was wrong with my computer.
After learning about DOS device names, I realized Windows was intentionally preventing these names because they are reserved for special system functions—not because of a bug.
What Are Reserved Device Names?
Windows reserves certain filenames because they refer to built-in system devices rather than ordinary files or folders.
Some of the most common reserved names are:
CON
PRN
AUX
NUL
COM1 to COM9
LPT1 to LPT9
These names are recognized by the operating system regardless of whether you add a file extension such as .txt.
Why Does Windows Block These Names?
These names were originally introduced in MS-DOS to represent hardware devices and special system functions.
For example:
| Reserved Name | Original Purpose |
|---|---|
| CON | Console (keyboard and screen) |
| PRN | Printer device |
| AUX | Auxiliary device (often a serial port) |
| NUL | Null device (discards data) |
| COM1 | Serial communication port |
| LPT1 | Parallel printer port |
To maintain compatibility with older software, Windows still treats these names as special device identifiers.
💡 My Recommendation
When naming files or folders, avoid using reserved device names. Instead, use descriptive alternatives such as:
Console_FilesProject_CONAuxiliary_DataNull_Backup
These names are valid and won't conflict with Windows.
What Happens If You Try to Create One?
For example, if you try:
mkdir CON
Windows typically displays an error because CON is interpreted as a reserved device rather than a normal folder name.
Similarly:
mkdir AUX
or
mkdir NUL
will also fail under normal circumstances.
Other Reserved Names
Windows also reserves:
| Name | Description |
|---|---|
| CON | Console |
| PRN | Printer |
| AUX | Auxiliary device |
| NUL | Null device |
| COM1–COM9 | Serial ports |
| LPT1–LPT9 | Parallel ports |
| CLOCK$ | Internal system device (legacy) |
These names cannot normally be used as standard file or folder names.
⚠️ Note
You may find articles or videos claiming that special techniques or extended path syntax can create folders with these names. These are advanced edge cases that rely on internal Windows path handling and are not intended for normal use. Creating such folders can confuse applications, make them difficult to manage, and is generally not recommended.
Why Is the NUL Device Special?
The NUL device acts like a "black hole" for data.
For example:
echo Hello > NUL
The output is discarded instead of being written to a file or displayed on the screen.
This behavior is commonly used in batch files to suppress unnecessary output.
Common CMD Examples
Display directory contents:
dir
Create a normal folder:
mkdir Projects
Attempt to create a reserved name:
mkdir PRN
Windows blocks this because PRN is reserved.
💡 Pro Tip
If you write batch scripts, understanding reserved device names can help you avoid confusing errors. Always choose meaningful folder names that don't conflict with Windows' built-in device identifiers.
Common Problems and Solutions
| Problem | Solution |
|---|---|
| Can't create CON folder | Choose a different folder name |
| CMD shows an invalid filename error | Check whether you're using a reserved device name |
| File won't save as AUX.txt | Rename the file to something else |
| Batch script behaves unexpectedly | Verify that filenames don't match reserved names |
| Unsure if a name is reserved | Avoid classic device names such as CON, AUX, PRN, NUL, COM1, and LPT1 |
Image Suggestions
Include screenshots of:
Command Prompt window.
Attempting
mkdir CON.Error message.
Reserved names list.
DOS device concept diagram.
echo Hello > NULexample.Successfully creating a normal folder.
Quick Summary Table
| Reserved Name | Original Purpose |
|---|---|
| CON | Console |
| PRN | Printer |
| AUX | Auxiliary device |
| NUL | Null device |
| COM1–COM9 | Serial ports |
| LPT1–LPT9 | Parallel ports |
Common Beginner Mistakes
Avoid these mistakes:
Trying to create folders named CON or AUX.
Assuming the error indicates a Windows bug.
Using reserved names in batch scripts.
Believing all online "CMD tricks" are safe.
Renaming important files to reserved device names.
Ignoring Windows error messages.
Using reserved names for project folders.
Interesting Facts
These reserved names date back to the MS-DOS era.
Windows keeps supporting them for backward compatibility.
The NUL device silently discards any data written to it.
Reserved names are recognized even if you add extensions like
.txt.Modern versions of Windows still preserve this behavior to avoid breaking older software.
Best Practices
Use meaningful, descriptive folder names.
Avoid all reserved device names.
Test batch scripts with ordinary filenames.
Learn the purpose of Windows device names before experimenting.
Use CMD commands carefully when working with system files.
Follow official Windows naming conventions for maximum compatibility.
Conclusion
The reason you can't create folders named CON, AUX, NUL, PRN, COM1, or LPT1 isn't a bug—it's a design choice that dates back to the early days of DOS. These names are reserved for special system devices, and Windows continues to protect them for compatibility with older software.
Understanding this hidden part of Windows helps explain one of its longest-standing "mysteries" and gives you a better understanding of how the operating system works behind the scenes.
Frequently Asked Questions (FAQs)
1. Why can't I create a folder named CON?
Because CON is a reserved Windows device name that refers to the system console.
2. What does NUL mean in Windows?
NUL is a special device that discards any data sent to it, often used to suppress command output.
3. Can I create a file named AUX.txt?
No. Windows treats AUX as a reserved device name even when a file extension is added.
4. Are these names still reserved in Windows 11?
Yes. Modern versions of Windows continue to reserve these names for compatibility.
5. What are COM1 and LPT1?
They are legacy reserved names representing serial communication ports and parallel printer ports.
6. Is this a Windows bug?
No. It is an intentional compatibility feature inherited from MS-DOS.
7. Should I try methods that bypass these restrictions?
For normal use, no. Such methods are unsupported, can create confusing filesystem behavior, and offer little practical benefit.
