Show or Hide Hidden Files on your Mac with Applescript
Tags:
Bottom line: Use this Applescript to quickly show or hide the hidden files on your Mac.
As some of you might know, Mac OSX has hidden files whose filename starts with a period. Sometimes you need to access those hidden files, and to do so you usually have to use a third party tool or crank up Terminal. (In Terminal you can either reveal them in Finder or edit them directly.)
I wrote up a quick Applescript that runs simply runs this Terminal command and relaunches Finder to get them to show up. It has a popup prompt for you to tell it to show or hide the files (or cancel). I index it with Quicksilver to make launching as simple as possible. The only issue I have is that sometimes I have to run it a couple times to get the hidden files to actually show up — not sure why this is. If anyone has any ideas, let me know in the comments.
The actual code is below, and here’s another link to a downloadable copy of the script.