Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a file called ".hgignore copy" and I want to rename it to ".hgignore". With a regular file, if I click on the name in the finder, I can change it. But with a hidden file, it won't let me do that. How can I change the name?

share|improve this question
    
It won't show the file, it won't let you click on the file, or it won't let you rename it? Which? –  Ignacio Vazquez-Abrams Dec 10 '10 at 14:53
add comment

4 Answers

up vote 6 down vote accepted

In the worst case you could always open a terminal and rename it there.

mv ".hgignore copy" .hgignore
share|improve this answer
    
typed faster, i'll delete mine –  hbdgaf Dec 10 '10 at 14:54
add comment

You can rename the file in Terminal by entering

mv .hgignore\ copy .hgignore

You can also enable displaying of hidden files in Finder by entering

 defaults write com.apple.finder AppleShowAllFiles TRUE

in Terminal and restarting Finder by entering

 killall Finder

afterwards


A more user-friendly alternative to the second part of this answer is the use of Secrets, a "preference pane" extension for System Preferences, that lets you set this "hidden files" option for Finder in a more userfriendly way.

share|improve this answer
add comment

The easiest way, I've found, is to CTRL(right)-click on the file, choose Get Info, change the name in the Name and Extension box, and hit Return (or just close the Get Info window).

share|improve this answer
2  
The OP asked about when files are invisible. If they are invisible (and not made visible like in Daniel Beck's answer) you can not do this. This answer doesn't help at all. –  Rich Homolka Apr 12 '13 at 19:02
    
@Rich Homolka He asked about hidden files - you can change OSX to display hidden files (dotfiles) in finder. This answer works well if you have made your hidden files visible. –  James Zaghini Nov 26 '13 at 22:42
add comment

One Man Gang's answer actually does answer the OP's question. The OP never said they were "invisible" but that they were "hidden" files that he couldn't rename by clicking on them (hence they were not invisible if he could click on them, just "hidden" or system files). Using the info window worked for me when I had the same problem.

share|improve this answer
2  
This is a comment, not an answer. –  Jonathan Leech-Pepin Jun 5 '13 at 13:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.