Why Can't You Name A Folder CON On Windows?

Short54,869 views35 s20 October 2026

Windows still refuses folders named CON, PRN, AUX or NUL, because MS-DOS reserved them for devices in the 1980s.

The script

Try naming a folder con on Windows... it won't let you.

Windows just says the device name is invalid.

You see, in the early nineteen eighties, em ess doss gave a few names a special job.

Con was the console. P R N was the printer. Then aux, null, and the ports.

Use one of those names, and doss didn't make a file... it talked straight to the device.

Windows never dropped them, because thousands of old programs still used them.

So forty-five years later, your computer is still protecting a printer from the nineteen eighties.

Go on...

The facts, checked

  • Windows reserves CON, PRN, AUX, NUL, COM1–COM9 and LPT1–LPT9, case-insensitive. These are MS-DOS device names (CON is the console, i.e. keyboard and screen; PRN is the printer; NUL discards everything).
  • Windows keeps them for backward compatibility. The Win32 path layer (Explorer, PowerShell, .NET) refuses them; NTFS itself doesn't.

Sources

  1. Microsoft: Naming files, paths and namespaces
  2. Meziantou: Reserved filenames on Windows
  3. DEV: Why you can't name a file CON

Get Stack Trace every Monday

The week's biggest tech story, the sources behind it and what else happened. Free.

Every Monday. Unsubscribe with one click.

Watch next

All Shorts