Stuff I do and more…
14 Aug
Lately I’ve needed to show .htaccess file in finder. In finder every file with a dot in front of it is hidden. You have to change this using shell commands. But this is a superfluous process. I scoured the internet and found ways to automate this. There are some software solutions but the way I will tell about is using the Automator
Step 1
Start up your Automator. It is under Tools in your Applications. On opening the Automator choose Custom. Choose Run Shell Script and drag it into the workflow area. 
Step 2
In the input area copy the code:

Code:
defaults write com.apple.finder AppleShowAllFiles TRUE osascript -e 'tell application "Finder" to quit'; osascript -e 'tell application "Finder" to activate';
Step 3
From the top menu choose File -> Save As Plugin. This script will show the hidden files. Save it as ShowHiddenFiles.

Step 4
We successfully created the Automator script to show the hidden files. Repeat the steps to create the script to hide the files again using the following:
Code:
defaults write com.apple.finder AppleShowAllFiles FALSE osascript -e 'tell application "Finder" to quit'; osascript -e 'tell application "Finder" to activate';
and save it as plugin as HideHiddenFiles
Use it:
In finder you can use Control Click -> More -> Automator to access the Automator scripts you just created

One Response for "Mac OS X – Show/Hide Hidden Files Automation"
Great automator! Would like to have it, but being a newbi and the changes in snow leopard, i could not adapt these (very handy) description. How would these steps look like in osx 10.6?
Leave a reply