• 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: entire contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: entire contents


  • Subject: Re: entire contents
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 19 Sep 2011 13:30:13 -0500

On Sep 13, 2011, at 5:47 PM, I wrote:

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

In an attempt to completely eliminate entire contents, and get a yet faster script, I have replaced the above script with this ...

set AppleScript's text item delimiters to {return}
try
mboxPath as alias
tell application "Finder" to (some folder of the result whose name extension is not "mbox") as alias
quoted form of (POSIX path of the result)
do shell script "find " & the result & " -name " & msgFileName
(POSIX file (item 1 of (text items of the result))) as alias
return the result
end try

It does work and it is faster. But ...

I don't have a lot of experience with the 'find' command.
 msgFileName  is a unique .emlx file, so the list can have only have one item.
Can I use this to make 'find' even faster?
Have I overlooked anything in my use of 'find'?

 _______________________________________________
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

References: 
 >entire contents (From: Luther Fuller <email@hidden>)
 >Re: entire contents (From: Luther Fuller <email@hidden>)

  • Prev by Date: SCRIPT DEBUGGER » HANDLER PICK-LIST » PORTABLE VERSION
  • Next by Date: Excel 2008 query tables not remembering their SQL-SOLVED
  • Previous by thread: Re: entire contents
  • Next by thread: Re: entire contents
  • Index(es):
    • Date
    • Thread