Filename "Com5". Why is that bad, please?

  • Thread starter Thread starter Rob Goodwin
  • Start date Start date
R

Rob Goodwin

Hi Guys. Can anyone tell me what's wrong with using "Com5" as a folder name,
please?

I used "Com5" and thought nothing of it but while re-organising my disk
found that Windows refused to delete it, saying the file could not be
found... It also couldn't be renamed, or moved anywhere but to the bin

There being no other apparent symptoms, I eventually reformatted the drive
and hey, Presto! thousands of other files of dozens of types behaved
normally but again, a new folder with the name could not be deleted, renamed
or moved anywhere but to the bin...

I again wiped the drive and this time chose "Com 5" but please, does using
"Com5" break some rule I should know about?
 
Rob said:
Hi Guys. Can anyone tell me what's wrong with using "Com5" as a
folder name, please?

I used "Com5" and thought nothing of it but while re-organising my
disk found that Windows refused to delete it, saying the file could
not be found... It also couldn't be renamed, or moved anywhere but to
the bin

There being no other apparent symptoms, I eventually reformatted the
drive and hey, Presto! thousands of other files of dozens of types
behaved normally but again, a new folder with the name could not be
deleted, renamed or moved anywhere but to the bin...

I again wiped the drive and this time chose "Com 5" but please, does
using "Com5" break some rule I should know about?

Yeah. An old throwback to the DOS days is tripping you up.
http://en.wikipedia.org/wiki/DOS_operating_system#Reserved_device_names_under_DOS


--
--
Rob Moir, MS MVP
Blog Site - http://www.robertmoir.com
Virtual PC 2004 FAQ - http://www.robertmoir.co.uk/win/VirtualPC2004FAQ.html
I'm always surprised at "professionals" who STILL have to be asked "Have you
checked (event viewer / syslog)".
 
Robert said:
Yeah. An old throwback to the DOS days is tripping you up.
http://en.wikipedia.org/wiki/DOS_operating_system#Reserved_device_names_under_DOS

--
--
Rob Moir, MS MVP
Blog Site - http://www.robertmoir.com
Virtual PC 2004 FAQ - http://www.robertmoir.co.uk/win/VirtualPC2004FAQ.html
I'm always surprised at "professionals" who STILL have to be asked "Have you
checked (event viewer / syslog)".

How to Remove Files with Reserved Names in Windows XP
http://support.microsoft.com/kb/315226/en-us
 
Reserved Names (reserved device names)

[[Do not use the following reserved device 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 LPT9. Also avoid these
names followed by an extension, for example, NUL.tx7.

Windows NT: CLOCK$ is also a reserved device name. ]]
from...
Naming a File
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp

See this on how to delete a file/folder with a reserved name...
Cause 5: The file name includes a reserved name in the Win32 name space
http://support.microsoft.com/?kbid=320081#XSLTH3186121122120121120120
from...
You cannot delete a file or a folder on an NTFS file system volume
http://support.microsoft.com/?kbid=320081

--
Hope this helps. Let us know.

Wes
MS-MVP Windows Shell/User

In
 
Oh, my Lord... Ancient parts of memory creak and grind and I see what you
mean, even though I'd never noticed "Com" could count that high.

Thanks Wesley, and thanks Lem and Robert, too
 
Back
Top