Re: How to speed up execution time of this script
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