Reveal hidden files in Snow Leopard (easy way)
I need constantly switch between the show/hide dotted files state in Mac OS X Snow Leopard. I've dug up the net for an elegant solution to this problem. Soon I found an applescript approach at
http://www.macosxhints.com/article.php?story=20030409015020645
Some tweaking needed though:
--->8---
display dialog "Show Hidden Files..." buttons {"ON", "OFF"} ¬
default button 2
copy the result as list to {buttonpressed}
try
if the buttonpressed is "OFF" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles OFF"
if the buttonpressed is "ON" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles ON"
do shell script "killall Finder"
end try
---8<---
http://www.macosxhints.com/article.php?story=20030409015020645
Some tweaking needed though:
--->8---
display dialog "Show Hidden Files..." buttons {"ON", "OFF"} ¬
default button 2
copy the result as list to {buttonpressed}
try
if the buttonpressed is "OFF" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles OFF"
if the buttonpressed is "ON" then do shell script ¬
"defaults write com.apple.finder AppleShowAllFiles ON"
do shell script "killall Finder"
end try
---8<---

<< Home