• 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: Nigel Garvey <email@hidden>
  • Date: Tue, 20 Sep 2011 13:07:02 +0100

Luther Fuller wrote on Mon, 19 Sep 2011 13:30:13 -0500:

>	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'?

Something along these lines?

  set msgFileName to quoted form of msgFileName
  try
    do shell script "find " & (quoted form of POSIX path of mboxpath) & " -not -path '*.mbox/" & msgFileName & "' -and -name '" & msgFileName & "' -and -maxdepth 2"
    return (paragraph 1 of result) as POSIX file as alias
  end try


NG

 _______________________________________________
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

  • Prev by Date: Re: Display Model Name
  • Next by Date: Re: DiskImageMounter
  • Previous by thread: Re: entire contents
  • Next by thread: [ANN] ModuleLoader 2.3
  • Index(es):
    • Date
    • Thread