Toggle the showing of hidden files in Mac OS X Finder

At work, I often have to deal with hidden files - or dot-files - in the OS X Finder. I usually have a TextMate project for every client website where I can open all files from the convenient project drawer but often I just have to quickly edit a line in a .htaccess or .htpasswd file and don’t feel like opening the whole TextMate project. On the other hand, I dont’t always want to see all hidden files in all folders. My home folder is littered with .ssh, .gpg, .DS_Store, .localized, .bashrc, .Trash etc. files which I don’t need to see most of the time.

Since it’s apparently impossible to modify the Finder so that it only shows hidden files in certain directories or it only shows hidden files matching certain criteria, I looked for another solution. Using defaults write in the Terminal, you can change the Finders settings and persuade it to display the hidden files on the filesystem, but I can also just use ls -al or mate ~/Projects/myproject/.htaccess to fire up TextMate directly with the .htaccess file opened, when I’m in the Terminal.

Screenshot of the OS X Finder with the 'Toggle Hidden Files' button in the menu bar

What I was looking for was a simple button in the Finder’s menu bar, that allowed me to toggle between hiding and showing those files. What I came up with is a small application that does just that. It doesn’t ask you whether you really want to toggle showing the hidden files, it doesn’t give you any options, you just click the button and can see all of your hidden files. And when you don’t need to see them anymore, they’re gone - at another click of the button. Convenient, isn’t it?

Here is how you use it:

  1. Download FinderToggleHiddenFiles.dmg and mount it
  2. Copy the ‘Toggle Hidden Files’ application to your Applications folder
  3. Go to your Applications folder and find the ‘Toggle Hidden Files‘ application
  4. Drag the ‘Toggle Hidden Files’ application to the free space on your Finder’s menu bar

Note: When dragging, hold it for a while until you see the green + icon next to your cursor.

This works on Tiger (10.4) and Leopard (10.5) on both PPC and Intel.

Tags: , , , , , ,

comments

There are 4 comments for this post.
  1. Comment #1
    Tim on August 14, 2008 at 15:10
    Pretty useful app. I wish it was a notification icon so it wouldn’t have to live on the dock, but it so useful already I can’t complain.
  2. Comment #2
    Alexander Graf on August 14, 2008 at 15:14
    Dear Tim, it does not have to live in your Dock! Just remove it from the Dock and follow the instructions above: You can drag the Application to the Menu Bar of a Finder window. In the screenshot you can see there is an extra button on the right side of the Finder window! Let me know if you need help with this. When dragging the application to the menu bar, you need to hold it for a few seconds.
  3. Comment #3
    Pierrot on September 25, 2008 at 23:17
    Seriously, this is one of the most helpful apps I’ve ever used! Great job! I hope you don’t mind but I blogged a little about it.

    http://www.devtronik.com/apple/toggle-hidden-files/

  4. Comment #4
    Brett on October 1, 2008 at 15:10
    Alexander, well done - I had exactly this need in particular when migrating servers and copying many .[a-z]* files from various server to my Mac for archiving and editing. Thanks!

    -brett

trackbacks

There is 1 blog linking to this post
  1. Toggle the showing of hidden files in Mac OS X Finder - ZachBrowne.com

leave your reply

Let me know what you think.

who am i?

What you should know about me
Replace this line of text with an obligatory short two liner sentence about yourself.