Skip to content

Instantly share code, notes, and snippets.

@liufsd
Created October 5, 2016 07:48
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 liufsd/5c20e6260ae635e9b390c79240798af4 to your computer and use it in GitHub Desktop.
Save liufsd/5c20e6260ae635e9b390c79240798af4 to your computer and use it in GitHub Desktop.
on run
set myVar to do shell script "defaults read com.apple.finder AppleShowAllFiles 2>/dev/null"
if myVar is "1" then
#display dialog "cuttent is show. will hide it"
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
do shell script "killall Finder"
else
#display dialog "current hidden. will show it"
do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
do shell script "killall Finder"
end if
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment