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

Solution 1:

"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:\>

Solution 2:

CON is a reserved name in Windows. So are PRN, AUX, NUL, LPT1 and others.