Wednesday, August 11, 2010

Toggle hidden files in Finder under OSX

(from OSXHINTS)

Launch Automator and choose Service as your template. Drag the Run AppleScript action from the Utilities library to the work area on the right. At the top right, select Finder.app from the second drop-down box, then No Input from the Service Receives drop-down.

Copy the following code and paste it into the Run AppleScript box (between the lines beginning on run and return input):

if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is equal to "0" then
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
else
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end if
tell application "Finder" to quit
tell application "Finder" to activate
(As you copy and paste, make sure the apostrophes and quotes come through as plain text.) Save the Service (as Toggle Hidden Files or whatever you like) and exit Automator.

No comments:

Post a Comment