Brifing

Why Windows Forbids Naming Folders CON

A 45-year-old legacy quirk prevents users from using reserved device names in Windows.

How-To Geek3 min

1The Legacy of CON

Windows prevents users from naming files or folders 'CON' due to a restriction originating in 1981 with DOS 1.0. Back then, 'CON' stood for Console, representing the keyboard and screen. The system treated device names as files, meaning any attempt to create a file named CON would conflict with hardware input and output.

2Primitive Computing Constraints

In the early 1980s, DOS lacked subfolders and utilized a flat directory structure. Because device names functioned like files, the system could not distinguish between a user-created file and a hardware command. This primitive architecture necessitated reserving specific names to ensure that data instructions were correctly routed to the screen rather than a file.

3Evolution of Reserved Names

When DOS 2.0 introduced folders, the risk of naming conflicts expanded globally across the file system. Microsoft maintained these restrictions to prevent system crashes, as code assemblers might inadvertently attempt to read from or write to a folder instead of a hardware device. This backward compatibility remains a core requirement for modern Windows.

4Modern System Validation

Today, Windows uses the Win32 API subsystem to sanitize and validate file paths before creation. When a user attempts to use a reserved name like CON, PRN, or AUX, the system checks the input against hardcoded lists. This process ensures that no application accidentally triggers a conflict with legacy hardware drivers or interfaces.

5The Object Manager Role

The Windows Object Manager acts as a resource broker for system data. When it detects a reserved name, it routes the request to a hidden virtual directory containing symbolic links. These links map device names to kernel drivers, such as the NT object path for the console, preventing direct file system access.

6Bypassing the Restriction

Users can technically bypass this validation by using the '\\?\' prefix in the Command Prompt, which forces the system to write the name to the partition. However, this is highly discouraged as it often leads to system freezes or crashes whenever Windows Explorer or other applications attempt to interact with the invalid path.

7Legacy App Dependencies

Despite modern advancements like .NET and UWP, many legacy applications still rely on these reserved names. Industrial control systems, older PC games, and specialized medical equipment often require these identifiers to function correctly. Consequently, Microsoft must keep these names reserved to maintain support for critical infrastructure and older software environments still in use.

8Persistent Technical Constraints

While the likelihood of needing to name a folder 'CON' is low, the restriction highlights the enduring influence of early computing design. These 45-year-old quirks demonstrate how foundational decisions in operating system architecture continue to shape user experiences and system security protocols within the modern Windows environment decades after their initial implementation.

Original article: How-To Geek — Why Windows Forbids Naming Folders CON