views:

145

answers:

4

I am trying to create a file in Windows XP that is only the extension (".classpath" and ".project"). While my Linux box handles this appropriately, Windows gives me the error, "You must type a file name."

Any suggestions how to do this? I am attempting to setup an Eclipse project where I can bring in the classpath and project files from someone else's setup and I keep getting the above error.

+9  A: 

use the commandline to do this, windows explorer doesn’t allow renamed files to start with a period. first create the file/directory with a dummy name x.ext, then fire up cmd.exe and rename it:

ren x.ext .ext

this way you can also create directories which names start with a period (like .git or .meta)

knittl
20+ years of working with DOS and it's kid brother, Windows, and this is the first I ever heard of this. Sheesh, there's ALWAYS something new.
Philip Kelley
i never knew you couldn't change to a dot name in explorer either
warren
wth, downvote!?
knittl
+1  A: 

From the command line:

echo some text > .classpath
RedFilter
A: 

Windows seems not to be in control of how Save dialogs handle forbidden characters

vkolodrevskiy
+1  A: 

Quoting the filename should do the job.

I have no Windows machine to try it out but I was able to save a ".htaccess" file in Notepad this way.

Till Theis