Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: chaim dudi
  Where is chaim dudi?
 Jerusalem
 South Carolina - Israel
 chaim dudi
 To: Cetin Basoz
  Where is Cetin Basoz?
 Izmir
 Turkey
 Cetin Basoz
 Tags
Subject: RE: Fill Filer Files
Thread ID: 228628 Message ID: 228744 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Thursday, May 21, 2009 9:11:13 AM         
   


Its very good
Thank you
> > Hi
> >
> > I want to use vfp 'Filer' to retrieve files list into my cursor (grid cursor).
> >
> > The problem is that Filer change public\settings\focus etc.
> >
> > I can base my cursor on table, to rebuild the Filer as other EXE, to add command in the filer to fill the table with the files list listbox before exiting.
> >
> > It is necessary?
> >
> > Thank
>
> Chaim,
> As I told you on UT you can use the dll Filer form uses:
>
>
lcStartDir = "c:\temp"
> lnFiles = GetTree(m.lcStartDir,'*.dbf;*.cdx;*.fpt', 'myCursor', .t.)
> Select * from myCursor order by filepath,filename
> 
> Function GetTree
> Lparameters tcStartDir,tcSkeleton,tcCursorName,;
>   tlSubfolders,;
>   tlWholeWords,tlIgnoreCase,tlSearchAnd,tcSearch1,tcSearch2,tcSearch3
> Create Cursor (m.tcCursorName) ;
>   (filepath c(250), filename c(250), ;
>   FileSize i, fattr c(8), createtime T, lastacc T, lastwrite T)
> Local oFiler, lnFound
> oFiler = Createobject('filer.fileutil')
> With oFiler
>   .SearchPath = m.tcStartDir
>   .FileExpression = m.tcSkeleton && Search for skeleton
>   .Subfolder   = iif(m.tlSubfolders,1,0)  && Check subfolders
>   .IgnoreCase  = iif(m.tlIgnoreCase,1,0)
>   .WholeWords  = iif(m.tlWholeWords,1,0)
>   .SearchAnd   = iif(m.tlSearchAnd,1,0)
>   .SearchText1 = iif(empty(m.tcSearch1),"",m.tcSearch1)
>   .SearchText2 = iif(empty(m.tcSearch2),"",m.tcSearch2)
>   .SearchText3 = iif(empty(m.tcSearch3),"",m.tcSearch3)
>   lnFound = .Find(0)
>   For ix=1 To m.lnFound
>     With .Files(ix)
>       If !(Bittest(.Attr,4) And .Name = '.')
>         Insert Into (tcCursorName) ;
>           (filepath, filename, FileSize, fattr, createtime, lastacc, lastwrite)  ;
>           values ;
>           (.Path, .Name, .Size, Attr2Char(.Attr), ;
>           Num2Time(.Datetime), Num2Time(.LastAccessTime), Num2Time(.LastWriteTime))
>       Endif
>     Endwith
>   Endfor
> Endwith
> Return lnFound
> 
> Function Num2Time
> Lparameters tnFloat
> Return Dtot({^1899/12/30}+Int(m.tnFloat))+86400*(m.tnFloat-Int(m.tnFloat))
> 
> Function Attr2Char
> Lparameters tnAttr
> Return ;
>   IIF(Bittest(tnAttr,0),'RO','RW')+;
>   IIF(Bittest(tnAttr,1),'H','_')+;
>   IIF(Bittest(tnAttr,2),'S','_')+;
>   IIF(Bittest(tnAttr,4),'D','_')+;
>   IIF(Bittest(tnAttr,5),'A','_')+;
>   IIF(Bittest(tnAttr,6),'E','_')+;
>   IIF(Bittest(tnAttr,7),'N','_')

>
>
> Cetin Basoz
>
> .Net has got better.Think about moving - check my blog:
> Blog (main)
> Blog (mirror)

ENTIRE THREAD

Fill Filer Files Posted by chaim dudi @ 5/20/2009 11:13:38 AM
RE: Fill Filer Files Posted by Ilya Rabyy @ 5/20/2009 6:44:07 PM
RE: Fill Filer Files Posted by Cetin Basoz @ 5/20/2009 7:01:53 PM
RE: Fill Filer Files Posted by chaim dudi @ 5/21/2009 9:11:13 AM