Skip to content

Instantly share code, notes, and snippets.

@inferjay
Last active December 20, 2015 22:49
Show Gist options
  • Select an option

  • Save inferjay/6207912 to your computer and use it in GitHub Desktop.

Select an option

Save inferjay/6207912 to your computer and use it in GitHub Desktop.
on run
-- Read the current value of AppleShowAllFiles
set plistValue to do shell script "defaults read com.apple.finder AppleShowAllFiles"
set plistCommand to "defaults write com.apple.finder AppleShowAllFiles"
if plistValue is "false" then
set shellCommand to plistCommand & " true"
else
set shellCommand to plistCommand & " false"
end if
do shell script shellCommand
-- Restart the Finder to see the new value
do shell script "killall Finder"
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment