This is the quickest and easiest way I’ve found to set this up on your Mac.
- Open Automator (look for the little robot with the pipe)
- In the Library pane expand applications and select Automator (Robot, pipe remember).
- In the Action pane double-click ‘Run Shell Scrip’.
- Type or copy-and-paste* the following into the text area of the ‘Run Shell Script’ action.
defaults write com.apple.finder AppleShowAllFiles TRUEkillall Finder
* Be careful if you copy-and paste: sometimes you can end up with additional unwanted characters that stop the code from working.
- Save the workflow as a plug-in for Finder. You should call it something like “Show Hidden Files”
File -> Save As Plug-in
- Having saved that return to the code in the action and change ‘TRUE’ to ‘FALSE’ then save this as another Finder plug-in named something like ‘Hide Hidden Files’.
Now when you are in Finder you should find two new items under the Automator section of your context menu.

