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: Quatch on Oct 15, '09 11:18:42AM
Anyone have a version of this that works in 10.6? I tried:

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 do shell script OnOffCommand
delay 0.3
tell application "Finder" to launch
end try
But, running produces an error:
 2009-10-15 14:17:39.892 defaults[1823:60f] 
The domain/default pair of (com.apple.finder, AppleShowAllFiles) does not exist
Thanks.

[ Reply to This | # ]
An AppleScript to quickly show or hide hidden files
Authored by: Quatch on Oct 15, '09 11:20:27AM
Oy. Answering my own question, by reading someone elses post.
defaults write com.apple.finder AppleShowAllFiles -bool true
that true/false instead of 1/0 is required in 10.6 Thank you and have a nice day :)

[ Reply to This | # ]