[X4U] hidden files

John Azevedo zoff at mac.com
Sat Feb 12 18:37:29 PST 2005


On Feb 9, 2005, at 3:29 PM, Richard Gilmore wrote:

>
> How do you make the Finder show invisible files?

I use the following script from the script menu. It toggles file 
visibility.
(watch out for the line breaks. I've added -- to the end of each line)

try
	set show_all to "defaults write com.apple.finder AppleShowAllFiles 
ON"--
	set dont_show_all to "defaults write com.apple.finder 
AppleShowAllFiles OFF"--
	
	set show_all_files to (do shell script "defaults read com.apple.finder 
AppleShowAllFiles")--
	if show_all_files is "OFF" then--
		display dialog "Are you sure you want to show hidden files?" & return 
& "The Finder will relaunch."--
		do shell script show_all--
		relaunch_finder()--
	else--
		display dialog "Are you sure you want to hide hidden files?" & return 
& "The Finder will relaunch."--
		do shell script dont_show_all--
		relaunch_finder()--
	end if--
end try--
to relaunch_finder()
	try--
		tell application "Finder" to quit--
		delay 1--
		tell application "Finder" to launch--
	end try--
end relaunch_finder--



More information about the X4U mailing list