Take the 2-minute tour ×

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.


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


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)
LST: — list output device, usually the printer
NUL: — null device, akin to /dev/null

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
