Re: entire contents
Re: entire contents
- Subject: Re: entire contents
- From: Luther Fuller <email@hidden>
- Date: Tue, 13 Sep 2011 17:47:08 -0500
Here is the slow code that was causing the 20 sec delay per item ...
tell application "Finder" try mboxPath as alias (some folder of the result whose name extension is not "mbox") as alias some file of entire contents of the result whose name is msgFileName return the result as alias end try end tell
I took advantage of the fact that the file msgFileName is always contained in a folder named "Messages" and tried this code ...
tell application "Finder" try mboxPath as alias (some folder of the result whose name extension is not "mbox") as alias set msgFolderList to (every folder of entire contents of the result whose name is "Messages") as alias list repeat with msgFolder in msgFolderList try (file msgFileName of msgFolder) as alias return the result end try end repeat end try end tell
It works! Very fast, in fact. I could have rewritten as something similar that searches all sub-folders recursively and I suspect that it would also be acceptably fast.
So why can't entire contents be fixed to eliminate all those dangerous symptoms?
|
_______________________________________________
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