• 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: Traversing Directories/Searching
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Traversing Directories/Searching (From: Mike Evans <email@hidden>)

  • Prev by Date: Re: getting a file list in sorted order
  • Next by Date: Re: (was Int Function) mod bug
  • Previous by thread: Traversing Directories/Searching
  • Next by thread: RE: Traversing Directories/Searching
  • Index(es):
    • Date
    • Thread