Created
July 20, 2016 23:45
-
-
Save philipnewcomer/c1a43637e5953012ae4e62b4e8f1d85b to your computer and use it in GitHub Desktop.
Toggle Hidden File Visibility
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
tell application "System Events" | |
set hiddenFilesDisplayStatus to do shell script "defaults read com.apple.finder AppleShowAllFiles" | |
set hiddenFilesNewDisplayStatus to "NO" | |
if hiddenFilesDisplayStatus is "NO" then | |
set hiddenFilesNewDisplayStatus to "YES" | |
end if | |
do shell script "defaults write com.apple.finder AppleShowAllFiles " & hiddenFilesNewDisplayStatus | |
do shell script "killall Finder" | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment