I am thinking that perhaps using Launch External Process there might be a way 
to search for a file and get back the path to the file if found.

I have a method that recursively crawls through a volume or folder to locate a 
file, but it is relatively slow. It is pasted below. Any ideas to make this 
more efficient or know how to use LEP to do a file search. Needs to work on 
both Mac and Windows.

Thanks,

John

//Method: SearchFolderContents_Jut
C_TEXT($1;$folderPath;$2;$documentToFind;$0;$pathToDocumentFound)
$folderPath:=$1
$documentToFind:=$2
$pathToDocumentFound:=""

DOCUMENT LIST($folderPath;$aDocuments)
$found:=Count in array($aDocuments;$documentToFind)

If ($found>0)
          $pathToDocumentFound:=$folderPath+$documentToFind
        
End if 

If ($pathToDocumentFound="")
        FOLDER LIST($folderPath;$aFolders)
        
        For ($i;1;Size of array($aFolders))
                $pathToDocumentFound:=SearchFolderContents_Jut 
($folderPath+$aFolders{$i}+Folder separator;$documentToFind)
                If ($pathToDocumentFound#"")
                        $i:=Size of array($aFolders)+10
                        
                End if 
                
         End for 
        
End if 

$0:=$pathToDocumentFound
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to