Can't name a folder 'Com' with a number


  1. Posts : 107
    Windows7 64
       #1

    Can't name a folder 'Com' with a number


    I have a folder in my C:/Web dir. called Com. It's where all my internet stuff resides. I just went to make a new folder, and I wanted to call it Com2. Nope. I tried Com3, then Com4 - Windows will not allow me to do this; I get an error that says "The specified device name is invalid." Huh?!? Com works. Com-1 works. So does Com10. Com 1 even works. But not Com1. And again, that's ANY number from 1-9. Any dir., any drive.

    The workaround is easy enough; give the folder any other name. But can someone explain to me why Win7, Vista, and XP do not allow for this?

    Thanks!
    Last edited by jasong1968; 27 Sep 2011 at 20:04.
      My Computer


  2. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #2

    Windows has several reserved file names for operating its system. Some are CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.
    Read More: http://en.wikipedia.org/wiki/Filename
      My Computer


  3. Posts : 107
    Windows7 64
    Thread Starter
       #3

    Ah, I see - thanks!
      My Computer


  4. Posts : 742
    MS Windows 7 Ultimate 64-bit SP1
       #4

    I will show you a way to create a folder called "com2" or "com3" in windows.

    Open command window
    navigate to the parent folder where you want to create the new folder.

    now type at the command prompt
    md \com2\\

    This will create a folder called "com2" in the parent folder.
    You can use this as any other folder.

    But you can not delete it from windows explorer later if you wish.

    To delete this folder, delete all the files from this folder,
    Open command window, navigate to the parent folder of "com2"

    type at the prompt
    rd \com2\\

    To delete the folder with files/subfolders in the folder in one shot,
    use the command
    rd /S \com2\\

    when it asks you to confirm press "y" and enter
    This will delete the "com2" folder including any files and subfolders inside it.

    This is how windows is bluffed to create a window with a reserved name.....
      My Computer


  5. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #5

    That can cause serious conflicts with serial ports and IRQ's.


    (1) In DOS systems, the name of a serial communications port. DOS supports four serial ports: COM1, COM2, COM3, and COM4. However, most software uses system interrupts to access the serial ports, and there are only two IRQ lines reserved. This means that the four COM ports share the same two IRQ lines. Typically, COM1 and COM3 use IRQ4, while COM2 and COM4 use IRQ3. So in general, if you have two devices, one of which is attached to COM1 and the other to COM3, you cannot use them simultaneously.
    What is COM? - A Word Definition From the Webopedia Computer Dictionary
    What is Component Object Model? - A Word Definition From the Webopedia Computer Dictionary
      My Computer


  6. Posts : 742
    MS Windows 7 Ultimate 64-bit SP1
       #6

    I have shown it as an example that creating a folder with a reserved name is possible.

    I have no experience on the repercussions of the above example on the system stability. But I strongly advice anyone on creating folder names using reserved names like COM1, LPT1, PRN, AUX etc... Do it at your own risk...

    The COM being a reserved name is from the COM port (serial communication port)
    I don't think the COM (Component Object Model) is a reserved name.....Please clarify.
      My Computer


  7. Posts : 24,479
    Windows 7 Ultimate X64 SP1
       #7

    Apparently only com or COM with 1-9 are reserved.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:48.
Find Us