Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to quickly show or hide hidden files' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to quickly show or hide hidden files
Authored by: marsofearth on Apr 20, '09 01:03:32PM
Updated the script so it works with Leopard 10.5.6 (Tested)

code originally from BrunoUsesBBEdit

delay 0.3
-- Had to add this delay at the start
-- For some reason script would hang when OnOFF = 0
-- Adding the Delay at the beginning fixed the issue
set OnOff to do shell script "defaults read com.apple.finder AppleShowAllFiles"
if OnOff = "1" then
set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 0"
else
set OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 1"
end if
try
tell application "Finder" to quit>br> do shell script OnOffCommand
delay 0.3
tell application "Finder" to launch
end try

I compiled the script as an Application and set the GUI so it would not appear in the dock when activated.
I have this little app sitting in my finder toolbar to quickly toggle file visablility as needed

All files can be downloaded from here --->> http://stashbox.org/492996/ShowInvisibles.zip
I hope this helps anyone!

Mars

[ Reply to This | # ]