*DirBrow.prg Clear All Clear Public oForm oForm=Createobject("MyForm",Addbs(Getdir("c:\program files")),"*.exe",.F.) Define Class MyForm As Form AllowOutput=.F. && so '?' output goes to screen Width=_Screen.Width Height=_Screen.Height-50 Width=1024 Height=798 Procedure Init(cPath As String, cMask As String, fSubDir As Boolean) Set Exclusive Off Set Safety Off Set Talk Off Set Exact Off Create Table Files (Path c(240),fname c(240),Fsize N(10,0),Timestamp T) This.DoDir(cPath,cMask) Index On Timestamp Descending Tag T && choose your desired order * INDEX on fsize DESCENDING TAG fsize This.AddObject("gr","grid") This.gr.AllowCellSelection=.F. This.gr.Visible=1 This.gr.Height=Thisform.Height This.gr.Width = Thisform.Width This.gr.AutoFit This.gr.Column3.InputMask="999,999,999" This.Show Procedure DoDir(cPath As String, cMask As String) Local N,i,aa[1] N=Adir(aa,cPath+cMask,"",1) For i = 1 To N Insert Into Files (Path,fname,Fsize,Timestamp) Values ; (cPath, aa[i,1], aa[i,2],Ctot(Dtoc(aa[i,3])+aa[i,4])) Endfor N=Adir(aa,cPath+"*.*","HD",1) && now without the mask, search for directories For i = 1 To N If "D"$aa[i,5] && if it's a dir If aa[i,1] != '.' This.DoDir(cPath+aa[i,1]+"\",cMask) && recur Endif Endif Endfor Enddefine