Created
October 8, 2016 03:57
-
-
Save vacharanon/c2daabb49d3393fb638d149211d3564f to your computer and use it in GitHub Desktop.
AppleScript to show/hide all files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
display dialog "Show all files?" buttons {"Show", "Hide", "Cancel"} | |
set result to button returned of result | |
if result is equal to "Show" then | |
do shell script "defaults write com.apple.finder AppleShowAllFiles -boolean true" | |
do shell script "killall Finder" | |
else if result is equal to "Hide" then | |
do shell script "defaults delete com.apple.finder AppleShowAllFiles" | |
do shell script "killall Finder" | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Roughly taken from http://stackoverflow.com/questions/20469894/how-to-make-a-script-to-show-hide-hidden-files-in-mac-os-x