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: LuKreme <email@hidden>
- Date: Tue, 10 Aug 2010 16:36:19 -0600
On 10-Aug-2010, at 16:12, Mark J. Reed wrote:
>
> OMM in a 10000-file folder this takes less than a third
> of a second to return the entire list:
>
> set fileList to paragraphs of (do shell script "ls " & quoted form of
> posix path of myFolder)
And don't forget about find as well, especially if you need to get all the files in a hierarchy.
(do shell script " find " & quoted form of POSIX path to myfolder & " -type f -name \"" & (articleNumber as text) & "*\"")
Even if you're only searching a single directory, it might be worthwhile to do the matching in the find or ls rather than in appleScript. Probably, even.
--
The other cats just think he's a tosser. --Neil Gaiman
_______________________________________________
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