Skip to content

Instantly share code, notes, and snippets.

View vacharanon's full-sized avatar

Vacharanon vacharanon

View GitHub Profile
@vacharanon
vacharanon / togglefinder.scpt
Created October 8, 2016 03:57
AppleScript to show/hide all files
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