Skip to content

Instantly share code, notes, and snippets.

@Lewwwk
Created December 16, 2013 17:29
Show Gist options
  • Save Lewwwk/7990845 to your computer and use it in GitHub Desktop.
Save Lewwwk/7990845 to your computer and use it in GitHub Desktop.
OSX Finder - hidden file toggle script
-- AppleScript to toggle hidden "." files
-- Submitted by Baltwo on Apple Support Community
try
do shell script "defaults read com.apple.finder AppleShowAllFiles"
on error
do shell script "defaults write com.apple.finder AppleShowAllFiles 0"
end try
if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is equal to "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
do shell script "killall Finder"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment