• 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: What does "Finder could not get folder..." mean?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What does "Finder could not get folder..." mean?


  • Subject: Re: What does "Finder could not get folder..." mean?
  • From: Chris Page <email@hidden>
  • Date: Wed, 01 Aug 2001 06:06:45 -0700

I forgot to mention where the error occurs...

nigh on 8/1/01 4:47 AM, Chris Page at email@hidden wrote:

> What does "Finder could not get folder..." mean? More to the point, what
> does it mean when the "get" is given a reference to a folder that was
> returned to me by the Finder in the first place. And why does this error
> seem to magically disappear if I mess around with the script enough, and
> then magically start happening again later?
>
> Here's roughly what I'm doing:
>
> -- f = folder "Contents" of package "Foo.app" of ...
>
> tell application "Finder"
> set lockedFiles to every item of f whose locked is true
> if the length of lockedFiles is greater than 0 then
> set pathList to ""
> repeat with l in lockedFiles
> set pathList to pathList & (" '" & l & "'")
^^^
It happens here. This sends a "get" event to the Finder, which returns the
error.

> end repeat
> tell application "MPW Shell"
> activate
> DoScript "SetFile -a l" & pathList
> end tell
> end if
> end tell
>
> In my real script, f is an argument that comes from somewhere else, and was
> generated by telling the Finder to get "the contents of" a folder. This is
> part of a recursive operation that attempts to unlock all the locked files
> in a folder by getting a path string for each item and passing it to MPW
> Shell to unlock with "SetFile".
>
> [I have to do this myself for two reasons: (1) "entire contents" doesn't
> work inside packages; the Finder just hangs, and (2) "set the locked of x to
> false" doesn't work inside packages, either; the Finder produces an error
> (what's up with that?). Even if I use "entire contents" on the folder before
> it becomes a package it is flaky and doesn't actually catch all the items
> that need to be unlocked, perhaps because the folder contains a lot of items
> *shrug*.]
>
> I tried using "items" vs. "files" and adding "contents of" to remove
> indirection in various places, and explicitly using "get l as alias" and
> "get l as text" and if I try these changes enough times, the script will
> start working. But later it mysteriously starts producing these "Finder
> could not get..." errors again, with no changes to the script (I'm pretty
> sure). It makes me think there's a bug in AppleScript, or it's hitting a
> memory limitation, or I'm just missing some fine detail that only
> accidentally lets this work sometimes.
>
> I also thought this just might be one more thing that doesn't work inside
> packages, but when I had it in the state where the error was occurring, I
> changed f to refer to the container of the package, so it wasn't trying to
> do anything inside the package, and the error continued to happen.


--
Chris Page
Mac OS Lead, Palm Desktop
Palm, Inc.

One of the symptoms of an approaching nervous breakdown is the belief that
one9s work is a giant talking wheel of cheese. - Bertell Russrand


  • Follow-Ups:
    • Re: What does "Finder could not get folder..." mean? (tell block abuse)
      • From: JollyRoger <email@hidden>
    • Re: What does "Finder could not get folder..." mean?
      • From: Jon Pugh <email@hidden>
References: 
 >What does "Finder could not get folder..." mean? (From: Chris Page <email@hidden>)

  • Prev by Date: Re: set variable to pict file contents? Set file icon to variable
  • Next by Date: Re: Read/Write 'as short' and 'write "" starting at'
  • Previous by thread: What does "Finder could not get folder..." mean?
  • Next by thread: Re: What does "Finder could not get folder..." mean?
  • Index(es):
    • Date
    • Thread