Re: Simple folder walk...I think
Re: Simple folder walk...I think
- Subject: Re: Simple folder walk...I think
- From: Doug McNutt <email@hidden>
- Date: Fri, 16 Aug 2002 13:54:02 -0600
At 15:16 -0400 8/16/02, Marc K. Myers wrote:
>
on procFldr(aFldr)
>
tell application "Finder"
>
set fldrList to folders of aFldr
>
set fileList to files of aFldr
>
end tell
>
repeat with aFile in fileList
>
set theFile to (aFile as alias)
>
my procFile(theFile)
>
end repeat
>
repeat with aFldr in fldrList
>
my procFldr(aFldr)
>
end repeat
>
end procFldr
>
Note that I don't put anything in the Finder tell block that doesn't
>
need to be there. I use the Finder to generate lists of files and
>
folders and that's it. Everything else is done within AppleScript
>
itself and the "info for" scripting addition command.
Chris Nebel has said, or at least implied, that AppleScript can and will use Finder to process classes therein defined even if the request is outside of a tell block addressed to finder. Somehow AppleScript - or is it the editor - recognizes finder classes.
I would appreciate some generalized discussion about whether "alias" is, or is not, a finder class and whether your repeat block above uses the finder in spite of what you think you're asking. What are the true speed advantages of executing "within AppleScript" as above?
--
--> If you are presented a number as a percentage, and you do not clearly understand the numerator and the denominator involved, you are surely being lied to. <--
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.