Skip to main content

Have You Ever Tried Renaming a File as "CON"?

If you have a Windows machine, I suggest you to try it now
You are most likely to get a error message like this

Windows doesn't allow you to name a file or a folder as
  • CON
  • AUX
  • PRN
  • LST
  • COM0 to COM9 (Serial Communication Ports)
  • LPT0 to LPT9 (Parallel Ports)
  • NUL
And to know the reason behind this, we'll have to go back to an older Operating System, MS-DOS. I am pretty sure most of you would have heard this.

The above names are actually System reserved files (Device Files), right from MS-DOS

These files enable Applications on a Computer to Interface with other devices like Printers, Keyboard etc.
For example, if you need to print a Word Document, It is first saved in the appropriate device file, And the device driver establishes a connection between your file and the Printer. 

The early versions of MS-DOS didn't have the concept of directories (Folders), and so when directories were added in later, those device files had to work everywhere, Which made the Operating System to Block these filenames everywhere.

Since each new version of Windows was built on top of previous versions,
Windows 10 still has some of the features of Older versions (MS-DOS) 

Comments