Re: Traversing Directories/Searching
Re: Traversing Directories/Searching
- Subject: Re: Traversing Directories/Searching
- From: Emmanuel <email@hidden>
- Date: Tue, 20 Aug 2002 01:06:07 +0200
At 9:02 PM +0200 12/8/02, Mike Evans wrote:
>
>
set foundAd to false
>
repeat with eachDirectory in theDirectories
>
set theSubs to every folder in eachDirectories
>
repeat with eachSub in theSubs
>
if exists (folder (search string) of eachSub) then
>
open folder(search string) of eachSub
>
set foundAd to true
>
exit repeat
>
end if
>
end repeat
>
if foundAd is true then exit repeat
>
end repeat
>
>
This code works but it is very slow and I don't want to have to
>
increase the search criteria in order to better pinpoint the possible
>
locations.
>
>
Any suggestions anyone might have that could make this task slicker
>
and quicker would be greatly appreciated.
If you are under OS X, here is what I would consider doing - the actual
feasibility depends on how big the folders are:
- use Smile's "list files" to list the whole content of "eachDirectory"
into a big string
- use Regular Expressions to search for the string (in its "second level"
position) in that big string.
Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.