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?

link|improve this question
Maybe you should try posting this on superuser.com – Jonas B Nov 2 '09 at 15:18
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
4  
See also "How do I rename a file to .htaccess in Windows 7?" at superuser.com/questions/56562/… – Arjan Nov 2 '09 at 15:30
feedback

migrated from stackoverflow.com Nov 2 '09 at 15:26

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

5 Answers

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
link|improve this answer
That was not appropriate for stackoverflow??? This is incredibly useful information. – mwengler May 2 at 22:45
feedback

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.

link|improve this answer
1  
How do you do it from the command line? – Buttons840 Nov 16 '11 at 20:13
feedback

Answer 1 is nonsense.

An exploit doesn't use the GUI, but a programming or scripting language. If you are concerned about not having malicious .xxx files in the wrong place, you should forbid creating .xxx file in batch files or maybe moving .xxx files around in Windows Explorer.

An exploit that relies on the user explicitly renaming a file by adding a dot in front is hardly a security risk.

link|improve this answer
feedback

Total Commander does it in visual manner.

link|improve this answer
feedback

Here's an easy way!

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.

That's all!

Still, I haven't been able to get PmWiki Simple Page Counter to run. What gives?

Jagtig

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

Your Answer

 
or
required, but never shown