49

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?

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Jim Tough
  • 678

6 Answers6

57

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.

Oliver Salzburg
  • 89,072
  • 65
  • 269
  • 311
Ankou
  • 571
46
  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

Ben Voigt
  • 7,346
7

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

Moak
  • 691
1

One solution to this is:

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

    mkdir .yourfoldername
    
zants
  • 135
0

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
0

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

mkdir ".folder"
Starx
  • 2,381
  • 5
  • 32
  • 37