• 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: How to speed up execution time of this script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to speed up execution time of this script


  • Subject: Re: How to speed up execution time of this script
  • From: "Mark J. Reed" <email@hidden>
  • Date: Mon, 9 Aug 2010 13:28:19 -0400

On Mon, Aug 9, 2010 at 8:10 AM, Bert Groeneveld
<email@hidden> wrote:
> set all_the_Hires_Images to name of every file of the_ImagePath_folder

Why not filter it at this point... as I see Ed has suggested:

set foundImageNames to every file of the_ImagePath_folder whose name
begins with articleNumber

But you can probably do much better with the shell:

set foundImageNames to paragraphs of (do shell script "cd " & quoted
form of posix path of the_ImagePath_folder & " && ls -1 " &
articleNumber & "*")

Note that all the solutions so far will, for instance,  find "654" if
you ask for "65".  If there's any sort of delimiter between the
article number and the rest of the filename, you should include that
at the end of the pattern you search for.

--
Mark J. Reed <email@hidden>
 _______________________________________________
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

  • Follow-Ups:
    • Re: How to speed up execution time of this script
      • From: Bert Groeneveld <email@hidden>
    • Re: How to speed up execution time of this script
      • From: Shane Stanley <email@hidden>
References: 
 >How to speed up execution time of this script (From: Bert Groeneveld <email@hidden>)

  • Prev by Date: Re: Libraries and effiency
  • Next by Date: Re: Libraries and effiency
  • Previous by thread: Re: How to speed up execution time of this script
  • Next by thread: Re: How to speed up execution time of this script
  • Index(es):
    • Date
    • Thread