Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Can't name a folder 'Com' with a number

27 Sep 2011   #1
jasong1968

Windows7 64
 
 
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!


My System SpecsSystem Spec
.
27 Sep 2011   #2
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

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 System SpecsSystem Spec
28 Sep 2011   #3
jasong1968

Windows7 64
 
 

Ah, I see - thanks!
My System SpecsSystem Spec
.

29 Sep 2011   #4
rraod

MS Windows 7 Ultimate 64-bit SP1
 
 

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 System SpecsSystem Spec
29 Sep 2011   #5
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

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


Quote:
(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 System SpecsSystem Spec
30 Sep 2011   #6
rraod

MS Windows 7 Ultimate 64-bit SP1
 
 

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 System SpecsSystem Spec
30 Sep 2011   #7
Britton30
Microsoft MVP

Windows 7 Ultimate X64 SP1
 
 

Apparently only com or COM with 1-9 are reserved.
My System SpecsSystem Spec
Reply

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




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Bulk Change All Folder Icons in Single Folder or Folder Type
First, please forgive me if I have overlooked this issue in the many searches I have performed thus far. I would like to know if anyone has a way to change all folder icons within a single folder to one specific icon without performing each one individually. I have over 1,400 folders within a...
Customization
Music folder displaying a my music option and a number in brackets
Hey guys, on my laptop i currently have this issue where my music seems to come up when your in the folder. its in blue writing and has a number in brackets which im presuming is how many files ive got in there or something like that. My computer does not have this and i also wish to remove this...
General Discussion
Find number of files in a folder?
OK. I have been trying to figure this out for over a week now with no luck. I know I can right-click and select properties to see the number of files and sub-folders in any folder. My problem is that I would like to know the number of files NOT INCLUDING hidden files and folders. Is there any...
General Discussion
One folder with files, inside a number of empty folders
In one of my Windows 7 Libraries, I have a folder 'A'. When I click to open it, another folder 'B' opens. When I click on 'B', the real folder I need, 'C' opens. It is only 'C', that contain my files. A and B are empty folders. The result is that I have to make three clicks to get at my files. This...
General Discussion
Filename append with number on copy to same folder?
I rebuilt my system and lost one functionality. When I copy a file, say a "Text.txt", using Explorer to the same folder, I get a new file named "Text - Copy.txt." Before I rebuilt, I would get "Text_2.txt." If I pasted again, I used to get "Text_3.txt." I checked another Windows 7 system and it...
General Discussion
Number of Items in Folder
I have a simple but strange problem, i used to be able to see the number of items in a given folder on the bottom left hand side when i opened it up, but that seems to have disappeared, so how do i get that back?
General Discussion


Our Sites

Site Links

About Us

Find 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 11:42.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App