Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Many programs needs folder names that starts with a dot, like .emacs.d, .gimp-2.2, .jedit etc. How do I create such a folder?

When using the Windows Explorer in Windows 2000 (and other versions), I get an error message saying "You have to enter a filename". The only solution I have come up with, is to open a command prompt (Start, Run, "CMD", OK) and enter "mkdir .mydir".

Why have Microsoft this error message in the Explorer, but not in the command shell? Is there any registry hack out there to fix this, so that I am able to enter the folder name directly in the Explorer?

share|improve this question

migrated from Nov 2 '09 at 15:26

This question came from our site for professional and enthusiast programmers.

This is an ancient protection built into windows explorer and dates back to the time that only DOS 8.3 filenames were available (Win 3.1) and files with just an extension were not allowed. Microsoft never bothered to remove this from the Explorer, probably because humans using the Explorer should be "protected" from accidentally creating files without a filename (i.e., only extension). – Abel Nov 2 '09 at 15:22
See also "How do I rename a file to .htaccess in Windows 7?" at… – Arjan Nov 2 '09 at 15:30

10 Answers 10

To create/rename on windows explorer, just rename to .name. - The additional dot at the end is necessary, and will be removed by Windows Explorer.

To create a new file begins with a dot, on command prompt:

echo testing > .name
share|improve this answer
I just tried .name. in Windows (XP) and it did not work; it complained about needing a filename. – Synetech Jun 24 '12 at 16:54
Confirmed to work on Windows 7. That's awesome. – Joe White Jun 30 '12 at 21:26
Confirmed to work on Windows 8. – Mr. Polywhirl Jan 24 '13 at 3:38
Only option to create in XP is thru command prompt. say mkdir .name – Antony Thomas May 8 '13 at 18:05
Works on Windows 10 - @Denny where did you find this gold nugget?! – Daniel Sokolowski May 29 '15 at 1:52

You can create a folder using the Command Prompt with:

mkdir .foldername

You can create a file using command prompt with:


share|improve this answer

Use any file browser other than Explorer (Shell). I have tested with WinRAR, 7-Zip ect. For example, open WinRAR, then navigate to your files or folders, click on it, press F2 (rename), put a . at beginning, Done! I have tested with both WinRAR and 7-Zip. You don't need to add to Zip or make a compressed file.

The simpler method I found in other answer, just put a . at the end too.

share|improve this answer

Open a Command Prompt window and enter the following commands:

cd /path/to/the/file
ren file.extension .file.extension

That worked for me.

share|improve this answer

You can do it with powershell cmdlet New-Item.

Open PowerShell console and enter

For File: New-Item .whatever -type file

For Folder: New-Item .whatever -type directory

share|improve this answer
Yeah, in Powershell 4.0 also works with "md" command. – Fernando Gonzalez Sanchez Oct 16 '14 at 19:26

Total Commander does it in visual manner.

share|improve this answer

Use Windows Powershell. Otherwise this is not possible with DOS/Explorer - only method is to create and then rename with the explorer window.

With Powershell you can

touch .bak


share|improve this answer

I couldn't create .bowerrc. So

First, I created bowerrc Then, to a dos prompt I said:

PS > ren bowerrc .bowerrc
PS > exit
share|improve this answer
you dont even need powershell. just plain old cmd (see other answers) - Powershell definitely works though :) – Nick Mar 22 at 6:45

Just download Anyclient and Fast Folder Rename. Fast folder rename will name a folder .whatever, using the replace feature. Anyclient will upload the folder and show it, even though it operates on a Windows system.

share|improve this answer
links to the utilities would be very useful – Jhonny D. Cano -Leftware- Aug 11 '11 at 17:14

Windows (Explorer) does not allow you to create a folder that starts with a dot ('.'). This is for security/exploit reasons. However, it is possible (as you noted) to create the folder manually using the Command Prompt.

So, if your question was how to do it in native Windows Explorer, the answer is no -- You cannot.

share|improve this answer
How do you do it from the command line? – Buttons840 Nov 16 '11 at 20:13
> Windows (Explorer) does not allow you to create a folder that starts with a dot ('.'). This is for security/exploit reasons. Huh? In what way? – Synetech Jun 24 '12 at 16:55
I second Synetech comment - if it is for "security/exploit reasons" then we need to call up Linus Torvald ASAP and tell him to plug this hole yesterday! – Nathan Adams Oct 12 '12 at 2:56

You must log in to answer this question.