In my recent efforts to get apache2 and mysql up and running on my iMac I often needed to view the hidden files in Finder. I was lucky enough to stumble across a hint that showed me exactly the commands I needed to run in terminal to view all the hidden files in Finder.
After viewing and hiding these files over and over again I realized that this would be a perfect plugin for Finder. I launched automator and found the 1 action item I needed to show and hide files in finder.
I selected “Run Shell Script” from the Utilities library and dragged it over to my workflow. I added the following text to the workflow:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

Once the code was included in the step, I saved the workflow as a Finder plugin: ShowHidden. Now to view the hidden files in finder, I simply right click (command + click) in Finder, select More, Automator, and then ShowHidden. Finder closes and then re-opens with all the hidden files and folders viewable.
To hide the files again, I created another workflow with the same “Run Shell Script” action and entered in this text:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder

I saved it as a Finder plugin, HideHidden. To hide the files and folders again, righ click (command + click) in Finder, select More, Automator, and then HideHidden. Finder will close and re-open with the files and folders hidden again.
Now there is no need to open Terminal to view OS X hidden files in Finder.
6 Responses so far.
Bazil
April 7, 2011 at 5:15 pmHi Dan!
It's a very nice article about hidden files. I would like to create such a plugin for myself too, but I never used Automator before. Hence, I have no idea how to save that Finder plugin. I stuck on the step «save it as a Finder plugin». Any detailed help steps would be very useful for me. Thanks beforehand.
Dan
April 7, 2011 at 5:43 pmBazil,
They've updated Automator so you now need to set this up as a Service in automator >> Set Service Receives to No Input and then run shell script. Add the script and save it. It will show up under Finder >> Services >> ShowHidden
view hidden files
May 30, 2012 at 9:51 pmAbout Your title Its really an awesome article to get to know about it. You have done such a fantastic work by creating it.
meermaedchen
October 6, 2012 at 4:19 amHi Dan, Thank you for the tip!
I always did it directly in the shell, but automator is much nicer.
Additionally I added the code line "open Desktop -a Finder" in the shell script, so my Finder opens the Desktop section, after I used Show or Hide hidden files service.
For all German speaking guys who want to do this: "Service" is called "Dienst" in the Automator, and "Run Shell Script" is called "Shell-Skript ausführen".
Vladimir
January 4, 2013 at 10:15 amDan great tip. However l have a problem. If i run the unhide script..all goes okay. But when l run my Hide script if fails. So l have to open Automator, Opn the service plugin and run it from inside the script. I have checked and all spelling etc is correct. Any ideas?
Thx Vladimir
dhinckley
January 4, 2013 at 10:22 amHey Vladimir,
Not sure what the problem would be. I just tried it again in OS X 10.8 on my system and it worked fine.
Which version of OS X are you running?
Leave a Reply
Get The Latest From Maciverse
Advertisement
Popular Articles
Apple Topics
Recent Posts
Copyright © 2012 Maciverse.com. All rights reserved.
Site powered by Go Fish Digital