Toggle the showing of hidden files in Mac OS X Finder
Thursday, July 17th, 2008At 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.
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:
- Download FinderToggleHiddenFiles.dmg and mount it
- Copy the ‘Toggle Hidden Files’ application to your Applications folder
- Go to your Applications folder and find the ‘Toggle Hidden Files’ application
- 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.




