Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Unable to rename a folder or a file as 'con'

In linux it works, but not it Windows, I tried a lot and It just returns to "New Folder", why?

share|improve this question

marked as duplicate by Dennis, Indrek, Sathya Aug 29 '12 at 14:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

3 Answers

up vote 10 down vote accepted

It is a reserved keyword:

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 immediately by an extension; for example, NUL.txt is not recommended. For more information, see Namespaces.

Naming Files, Paths, and Namespaces

Additional Information

Raymond Chen also writes about these reserved names in his blog post What's the deal with those reserved filenames like NUL and CON?.

Long story short, they existed back in DOS 1.0 and are still around for compatibility reasons (no joke):

But why do we carry these magic filenames forward even today?

Because everybody still relies on them. Just look at all the batch files that do things like redirect to >NUL or test if a directory exists by asking "if exist directoryname\nul", or all the documentation that says to create a file with "copy CON ...".

share|improve this answer
add comment

Com1 is the handle for serial port 1 on a pc (communication 1)

You may be able to do this from the command line by wrapping in quotes ( ren folder "com1"), but I'm unable to test right now.

share|improve this answer
add comment

You can't name folders/files COM[1-9] (there is more) because these are reserved as they are system communication ports.

A full list of reserved file/folder names can be found here.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.