Skip to content

Instantly share code, notes, and snippets.

@codekipple
Created January 2, 2012 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codekipple/1550704 to your computer and use it in GitHub Desktop.
Save codekipple/1550704 to your computer and use it in GitHub Desktop.
apple script to toggle the visibility of files in finder, copied from here: http://www.macworld.com/article/51830/2006/07/showallfinder.html#recommend428845
set dotVisible to do shell script "defaults read com.apple.Finder AppleShowAllFiles"
if dotVisible = "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
delay 1
tell application "Finder" to activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment