PERFECT!  I have got to sit down and read the LRM front to back on a regular 
basis. I have never used DOCUMENT LIST. 

DOCUMENT LIST is instantaneous and works in both the windows and mac 
environments.

Thanks Keisuke!

John

//quick and dirty code using DOCUMENT LIST...

Message2Close 
vNewFolderPath:=Select folder("Select the the parent folder that contains all 
drawings... ";1)
ARRAY TEXT($aDocList;0)
DOCUMENT LIST(vNewFolderPath;$aDocList;Absolute path+Ignore invisible+Recursive 
parsing)
ALL RECORDS([Document])
$size:=Records in selection([Document])
For ($i;1;$size)
        $pathFound:=""
        GOTO SELECTED RECORD([Document];$i)
        $searchFor:="@"+[Document]File_Name
        $found:=Find in array($aDocList;$searchFor)
        If ($found>0)
                $pathFound:=$aDocList{$found}
                
        End if 
        
End for 
Message2Close 



---- Keisuke Miyako via 4D_Tech <4d_tech@lists.4d.com> wrote: 
> DOCUMENT LIST with the "Recursive parsing" options gives you all the file 
> paths contained in a folder
> (since v13)
> 
> http://doc.4d.com/4Dv15/4D/15.4/DOCUMENT-LIST.301-3274226.en.html
> 
> it has some other useful options too (Ignore invisible, Absolute path)
> tha makes a lot of previous code for recursive searching pretty redundant.
> 
> > 2017/05/16 15:59、John Baughman via 4D_Tech <4d_tech@lists.4D.com> のメール:
> >
> > 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.
> 
> 
> 
> **********************************************************************
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
**********************************************************************

**********************************************************************
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