Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
13 years, 11 months ago
Vista allows files with empty "first name" (for example, ".svn").
However, when I try to remove the filename of an existing file, leaving the prefix, in Explorer or using cmd's 'rename', I fail. How can I easily rename files to include the suffix only?
(I use Vista, if that matters).
79.7k 17 17 gold badges 130 130 silver badges 214 214 bronze badges
Jun 9, 2009 at 14:26
5,860 9 9 gold badges 41 41 silver badges 49 49 bronze badges
You can also do a file name that starts with a period, and has no extension. Try naming it ".whatever." (
note the trailing period). This works in both Explorer and from the command line.
1,424 8 8 gold badges 33 33 silver badges 51 51 bronze badges
Jun 9, 2009 at 14:32
Joe Doyle Joe Doyle
1,681 14 14 silver badges 15 15 bronze badges
rename filename.txt ".txt"
Jun 9, 2009 at 14:31
Kevin Kuphal Kevin Kuphal
9,114 1 1 gold badge 35 35 silver badges 41 41 bronze badges
If you're looking at something called ".svn" more than likely you're really looking at a folder in which case "del" won't cut it. ".svn" is what TortoiseSVN (and maybe other SVN clients as well) calls its internal folders. There is an option to use an underscore character instead of a period. The "rename" command should still work fine on folders, though.
Other than that, standard cmd.exe commands should work just fine on "extension only" files.
ren file.abc .abc
copy file.abc .abc
Jun 9, 2009 at 14:33
37.8k 11 11 gold badges 92 92 silver badges 146 146 bronze badges
Same issue on Windows Server 2008.
Had a filed named 'keystore', needed it to be named '.keystore' .
Rename file to '.keystore.txt' , the problem is this is not a text file and the '.txt' extension causes file not found problems.
Open command prompt and use the move command to rename the file.
move .keystore.txt .keystore
Now the file does not have the .txt extension and file type is recongized as KEYSTORE File.
Aug 20, 2009 at 12:14
754 1 1 gold badge 7 7 silver badges 12 12 bronze badges
From the command line:
>.foo echo #first line
Nov 16, 2013 at 4:52
John Gietzen John Gietzen
458 5 5 silver badges 11 11 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only