Sometimes for the sake of curiosity, or based on an actual desire to just do something different, you may try to use some unusual names for folders on your Windows system–with mixed results. With that in mind, today’s SuperUser Q&A post has the answer to a curious reader’s question.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

Message window screenshot courtesy of Ben N (SuperUser).

The Question

SuperUser reader EdwardBlack wants to know why it is not possible to name a folder ._. on his Windows 7 system:

I just noticed that it is not possible to name a folder ._. on my Windows 7 system. It gets renamed to ._ instead. Sometimes it disappears just after naming it, but then reappears after refreshing the view. Windows seems to have a problem with dots at the end of a filename. Why is this?

Why is it not possible to name a folder ._. in Windows 7?

The Answer

SuperUser contributor Ben N has the answer for us:

Windows normally requires files to have either no extension or an extension that is at least one character long. It does not like zero length extensions (i.e. file names that end with a period). Folders can have extensions too, therefore, Windows does not let their names end with a period.

Source: From the article linked to by DavidPostill:

  • Use a period to separate the base file name from the extension in the name of a directory or file.

If you try to end a file or directory name with a period, Windows just assumes that you did not want an extension and thus removes it (even if you create it with the md command in a command prompt window).

Danger Zone

If you really want a folder name to end with period, you will need to use the magic raw name override sequence of \\?\. In a command prompt window, md \\?\C:\path\to\container\._. will indeed create a folder named ._., but lots of programs will have problems with it, even Windows Explorer:

Such a directory can only be removed with the rd command followed by its \\?\ name, or renamed with its short (8.3, dir /x) name.

Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Akemi Iwaya
Akemi Iwaya has been part of the How-To Geek/LifeSavvy Media team since 2009. She has previously written under the pen name "Asian Angel" and was a Lifehacker intern before joining How-To Geek/LifeSavvy Media. She has been quoted as an authoritative source by ZDNet Worldwide.
Read Full Bio »