[ACCEPTED]-Windows and renaming folders, the 'con' issue-directory

Accepted answer
Score: 64

Back in the MS-DOS days, "con" had 11 a special meaning. It referred to the console, and 10 allowed you to treat it like any other file. For 9 example, you might create a new text file 8 by typing copy con new.txt. Then you could enter your text 7 and hit ^Z when finished.

The thing is, you 6 can still do that. Therefore, as far as 5 the file system is concerned there is already 4 an object out there named con. There are other reserved names as 3 well, but I see that while typing this those 2 names have been provided already in other 1 answers.

Score: 24

Do not use the following reserved device 3 names for the name of a file:

CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and 2 LPT9

Source: MSDN

Other names, such as drive names, cannot 1 be used as well:


Source: Microsoft support

Score: 15

Actually you can rename the folder to con

use 7 this in the command prompt and this creates 6 a system folder named con on your C: Drive

md \\\\\.\\\C:\con

to 5 remove this folder you need to use this 4 in the command prompt

rd/s \\\\.\\\C:\con

And just for those 3 that are wondering "so why would you?" - my 2 name is CON and if I wish to use that as 1 my folder I WILL so "bugger you MS"

Con "OzDing"

Score: 2

This dates back to MS-DOS. Reading or writing 3 to a file named "CON:" read/wrote from the 2 console. I imagine Windows is still supporting 1 this for backwards compatibility.

More Related questions