Toggle hidden file viewing in Mac OS X

My one regret with OS X’s Finder is that I have found no easy way to toggle viewing hidden files and folders. In fact I was so perturbed that I went and wrote a small application to toggle hidden file and folder visibility when ran.

There are a couple of sites out there that show the way to do it, but none are that graceful. They require the user to force restart Finder (which is not desirable) and they usually call upon the use of Terminal and typing out the full command.

Not satisfied with a simple answer, and trying to avoid actual work, I decided to write up an AppleScript that would toggle the visibility of hidden files and folders from “on” to “off” every time you clicked it. I then packaged it up in a pretty little application, and even gave it a custom small icon so you can drag it to the right side of current icons in a Finder window and it looks pretty sharp. I got the icon idea from here.

Here’s the application! Hope it helps you out like it did for me.

And for those out there that like code: