-- Hope that someone can help speeding up the execution time of the following (part of) my script -- The execution time is acceptable as long as there are no more than let's say 500 pictures in the the_ImagePath_folder -- Unfortunately, the fact is that I have more than 10000 pictures inside the_ImagePath_folder -- What I want to achieve is getting a list of only those filenames (inside the_ImagePath_folder) that start with a given article number
-- This is what I have right now and executes much much much too slow: tell application "Finder" set all_the_Hires_Images to name of every file of the_ImagePath_folder --max 20 secs execution time if the_ImagePath_folder contains 10000 images (this is very acceptable since I run this part of the script only once.) end tell
-- Now the time consuming part for which I badly need help: set articleNumber to "6615" set foundImageNames to {} repeat with Image_Name in my all_the_Hires_Images if Image_Name starts with articleNumber then set foundImageNames to foundImageNames & Image_Name end if end repeat
-- Hope someone can help or give tips on how to speed up the last part of this script. -- Bert. |