• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: error attempting AppleShowAllFiles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error attempting AppleShowAllFiles


  • Subject: Re: error attempting AppleShowAllFiles
  • From: John Baltutis <email@hidden>
  • Date: Thu, 20 Oct 2011 17:49:20 -0700

On 10/20/11,  DaveC <email@hidden> wrote:
>
> This script worked under Snow Leopard. Now when run under Lion it
> gives this error:
>
>   ÝÝ error "2011-10-20 15:30:29.887 defaults[4263:f07]
>       The domain/default pair of (com.apple.Finder, AppleShowAllFiles)
> does not exist" number 1
>
> I'm not sure how to interpret the error.
>
> I did not write the script so cannot answer questions re. "why did you...?".
>
> Suggestions?

Means that the Finder was never modified to show invisibles and needs something
like this after the first line to create the pair:

On error do shell script "defaults write com.apple.Finder AppleShowAllFiles 0"
which leaves hidden ones hidden.

I don't know what a pristine Finder default plist looks like, since I've added
that years ago and normally always migrate, so this is a WAG.

> - - -
> set dotVisible to do shell script "defaults read
>com.apple.FinderAppleShowAllFiles"
> if dotVisible = "0" then
>	do shell script "defaults write com.apple.Finder AppleShowAllFiles 1"
> else
>	do shell script "defaults write com.apple.Finder AppleShowAllFiles 0"
> end if
> tell application "Finder" to quit
> delay 1
> tell application "Finder" to activate

BTW, I use this to toggle hiddens on and off:

if (do shell script "defaults read com.apple.finder AppleShowAllFiles") is
equal to "0" then
	do shell script "defaults write com.apple.finder AppleShowAllFiles 1"
else
	do shell script"defaults write com.apple.finder AppleShowAllFiles 0"
end if
do shell script "killall Finder"
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Excel 2011: Select noncontiguous columns
  • Next by Date: Re: mounting a volume with Applescript (Stefan Economou)
  • Previous by thread: Re: error attempting AppleShowAllFiles
  • Next by thread: Re: error attempting AppleShowAllFiles
  • Index(es):
    • Date
    • Thread