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

This question already has an answer here:

I'm on a Windows 7 machine and need to create a new folder whose name starts with a dot. To be specific, I need to create the folder "C:\USERS\theusername\.ec2" because that is the default location that the AWS plugin for Eclipse likes to find certain configuration files.

Windows 7 gives me an error message whenever I try to create a folder that starts with a dot:

You must type a filename

Seriously? There are already subfolders in this folder that start with a dot!

How can I tell Windows 7 to just shut up and create my folder?

share|improve this question

migrated from Sep 5 '11 at 0:46

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

marked as duplicate by Sathya Mar 11 '13 at 7:33

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.

up vote 27 down vote accepted
  1. From the folder above the parent for the new folder, shift-right click on the parent, choose "Open command prompt here".

  2. Type mkdir .ec2 (enter)

  3. Close the command prompt

share|improve this answer
This is what I have been doing but it just seemed wrong. At least now I know I'm not crazy. – Jim Tough Sep 5 '11 at 0:48
you can do the same without opening the command prompt by just typing the command into the directory bar (see my answer) skips 2 steps :) – Moak Aug 19 '14 at 16:34

This behavior is based on a "feature" of dos 8.3 where it was forbidden to have a file without a name.

Name the folder .name.

So the Explorer thinks you will create a file with a name but no extension(which is allowed). The explorer will then delete the dot at the end because it is unnecessary.

share|improve this answer
This is a simple and very elegant solution! – Erik Schierboom May 31 '14 at 13:14
@erik-schierboom, I hope you are referring to this answer, rather than to the solution provided by Microsoft ;-) – R. Schreurs Apr 25 at 14:42

From here.

To create/rename on windows explorer, just rename to .name.

The additional dot at the end is unnecessary, and will be removed by Windows Explorer.

In windows 8 (possibly 7) you can also type directly into the navigation bar "mkdir .name" without needing to open a command prompt

enter image description here

share|improve this answer
Renaming inside windows explorer can still result in automatic changes to case, etc. Do you know if this is special handling for mkdir or whether other CMD.exe built-in commands work also? – Ben Voigt Aug 19 '14 at 16:36
all commands executed from the bar are as if launched from cmd.exe within that folder. example I can run a git command or composer update and it opens the window there and runs the command – Moak Aug 19 '14 at 16:38

One solution to this is:

  1. Start > Run > cmd > OK
  2. Enter:

    mkdir .yourfoldername
share|improve this answer

Use the command line. Hold shift and right click in the directory you'd like to create a subdirectory in. Choose the "Open Command Prompt here" (or something like that) item. In it, type:

md .ec2
share|improve this answer

You can do this from CMD. Navigate to where you need then

mkdir ".folder"
share|improve this answer

Not the answer you're looking for? Browse other questions tagged .