Skip to content

Instantly share code, notes, and snippets.

@jasonburk
Created February 18, 2013 23:33
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 jasonburk/4981747 to your computer and use it in GitHub Desktop.
Save jasonburk/4981747 to your computer and use it in GitHub Desktop.
Application to let user choose if they hidden files to be visible or not.
--Jason Burk | jasonburk@gmail.com | twitter: @twothirtyam | app.net: @burk
--http://230.am
--Application to let user choose if they hidden files to be visible or not
set mainList to {"Show Files", "Hide Files"}
choose from list mainList with prompt "Would you like to show hidden files or re-hide them?"
set listchoice to result as text
if listchoice = "Show Files" then
tell application "Terminal"
do shell script "defaults write com.apple.Finder AppleShowAllFiles TRUE"
delay 2
do shell script "killall Finder"
end tell
else if listchoice = "Hide Files" then
tell application "Terminal"
do shell script "defaults write com.apple.Finder AppleShowAllFiles FALSE"
delay 2
do shell script "killall Finder"
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment