Naming convention to create folders

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

when i tried to create a folder or a file with the name CON, windows is not
allowing me to create it. i am using WINDOWS XP Professional SP2.
 
That is normal.

You cannot use it because CON is a reserved name.
It is not available for use even with an extension, e.g. CON.pdf is
illegal

Here is some old (ancient?) information I have on reserved names:

Reserved filenames
CON PRN, NUL, CLOCK$, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, AUX
(not even available with an extension, e.g. CON.com is illegal)

If a directory or filename is named any of these, it may be difficult
to remove.
Renaming, deleting or using RD does not work.
This is an answer for NT (not yet tried in Win95)

Answer: RD \\.\<drive letter>:\<path>\<file name>
i.e. RD \\.\C:\test\com1


(for a file, replace RD with DEL)


The syntax bypasses normal reserve-word checks altogether.


---more information from another
Add to that list the CD device name used in any CD device driver
command
line in CONFIG.SYS (or any other device that takes a name on the
command
line, I guess). Also, at least in my system, CONFIG$, IFS$HLP$,
XMSXXXX0 and SETVERXX.

....Alan
 
Thu, 11 Oct 2007 23:50:01 -0700 from Srinivas.devineni
when i tried to create a folder or a file with the name CON, windows is not
allowing me to create it. i am using WINDOWS XP Professional SP2.

I'll bet you also can't create one called PRN or AUX or LPT1 either.

Like CON, those are old DOS device names, and it was illegal for a
file to have those names. (There were a couple more, but I can't
remember them off hand.)

Somebody remind us now how "there is no DOS in Windows XP"?
 
Actually we where able to create files on a Windows server using these
reserved names. It happened when moving some UNIX files (a few of which used
some of these taboo names) over to the server, once they were created on the
server, boy did we have fun!

And no I'm not going to bite and say there is no DOS anymore, wish there WOS
:-)

JS
 
Back
Top