• 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: Process nested folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Process nested folders


  • Subject: Re: Process nested folders
  • From: Nigel Garvey <email@hidden>
  • Date: Tue, 5 Dec 2000 12:11:48 +0000

I wrote on Tue, 5 Dec 2000 02:31:55 +0000:

>It's very much faster to tell the Finder to fetch the folders of a
>folder. That way you don't have to loop through every item to see what it
>is. If you stick a beep in the procFldr() handler, you'll hear how much
>faster it is.
>
> on run
> open ({choose folder})
> end run
>
> on open (itemList)
> repeat with anItem in itemList
> if folder of (info for anItem) then procFldr(anItem)
> end repeat
> end open
[Followed by fastish handler]

I'm sorry. I'd forgotten about 'info for' taking a while to gather the
size info for the parent folder of a large hierarchy. Semicolon's message
immediately after mine in the digest reminded me. So:

on run
open ({choose folder})
end run

on open (itemList)
repeat with anItem in itemList
if last character of (anItem as string) is ":" then procFldr(anItem)
end repeat
end open

on procFldr(theFldr)
tell application "Finder"
repeat with anItem in (get every folder of theFldr)
my procFldr(anItem)
end repeat
end tell
beep -- do something with the folder
end procFldr

NG


  • Prev by Date: Help read from resource fork (end)
  • Next by Date: AppleScriptable Digital Camera?
  • Previous by thread: Re: Process nested folders
  • Next by thread: Name of Finder
  • Index(es):
    • Date
    • Thread