Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

When i make new folder and rename it to nul it says The Specified device name is invalid.

then I searched which are the other folders we can't make, and get names con, nul, prn ?

what are these names stands for ? and why can't we make folders with these names ?

share|improve this question

marked as duplicate by Ignacio Vazquez-Abrams, grawity, afrazier, Darth Android, Karan Jun 29 '13 at 2:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 3 down vote accepted

It all begins with the old PIP CP/M command - this command, used to copy files, allowed you to specify special device names instead of files.

Gary Kildall, who developed CP/M, based much of the design of its file structure and command processor on operating systems from Digital Equipment, such as RSTS/E for the PDP-11. Besides accessing files on a floppy disk, the PIP command in CP/M could also transfer data to and from the following "special files":

CON: — console (input and output)
AUX: — an auxiliary device. In CP/M 1 and 2, PIP used PUN: (paper tape punch) and RDR: (paper tape reader) instead of AUX:
LST: — list output device, usually the printer
PRN: — as LST:, but lines were numbered, tabs expanded and form feeds added every 60 lines
NUL: — null device, akin to /dev/null
EOF: — input device that produced end-of-file characters, ASCII 0x1A
INP: — custom input device, by default the same as EOF:
OUT: — custom output device, by default the same as NUL:

These were not true device files, however, because their handling was limited to PIP.

Then DOS comes around in the early 80's, an 8086 CP/M clone meant to work on the then-new IBM PC. DOS extended this concept a bit further - the above were "special files" and could be specified wherever a file was expected in DOS commands. So the built-in DOS copy command could be used to print a document by executing copy myfile.txt prn:. (Later versions of CP/M might have been able to do this but I doubt it.)

Flash forward to Windows 95. Itself being built on top of DOS, the code handling these special filenames remained, but evidently weren't integrated too well in the GUI portion of Windows 95. It caused some problems such as the CON\CON bug - and this is known to cause issues with IE as well.

Likely because of paranoia of further lurking bugs (even though none should exist in NT based versions of Windows) Microsoft decided to make it where Explorer always rejects any attempt to create a file of that name. It's funny that even in the Windows 8 system I'm using now, I still can't make a folder named "con."

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.