Windows – Why can’t I name a folder or file ‘CON’ in Windows

filenamesrenamewindowswindows-explorer

In all versions of Windows, we are unable to rename a file or a folder name as CON without third-party file renaming software. Trying to do this in Windows 7 results in an error:

The specified device name is invalid.

Trying to save a file as con.txt in Notepad leads to a similar error:

This file name is reserved for use by Windows.
Choose another name and try again.

Why can't we name a file or folder CON in Windows?

Best Answer

"con" is the name of a system I/O device, the console.

  • con
  • nul

And a couple others, I think.

In the old days it was common in DOS to create a file (and I still do this occasionally) with:

C:\>copy con foo.txt
I'm typing some text here.
^Z
    1 file(s) copied.
C:\>
Related Question