Re: Process nested folders
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