At 14:25 +0100 01_03_07, Clars wrote:
>hello All-
>
>I am working on a handler that can find a file anywhere on a computer.
>I think this can be done with BuddyAPI, but I'm looking to do it with
>the (free) fileXtra3 instead.

There are many ways to implement this, based on how you want to 
"find" and what you want returned, but here is one example using 
fileXtra3.

Dunno if this is technically "recursive"?
But it will walk the complete tree below the given path.

on findFiles aPath, aStr
   tSep = the last char of the moviePath
   if the last char of aPath <> tSep then
     aPath = aPath & tSep
   end if
   tSeekStr = aStr.string
   tFx = xtra("filextra3").new()
   tSeekList = [aPath]
   tFoundList = []
   repeat while tSeekList.count
     tSubPath = tSeekList[1]
     tSeekList.deleteAt(1)
     tThingList = tFx.fx_FolderToList(tSubPath)
     repeat with tThing in tThingList
       tSubThing = tSubPath & tThing
       if the last char of tThing = tSep then
         tSeekList.append(tSubThing)
       else
         if tThing contains tSeekStr then
           tFoundList.append(tSubThing)
         end if
       end if
     end repeat
   end repeat
   return tFoundList
end

Jakob

[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to