Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 To: chaim dudi
  Where is chaim dudi?
 Jerusalem
 South Carolina - Israel
 chaim dudi
 Tags
Subject: RE: Fill Filer Files
Thread ID: 228628 Message ID: 228675 # Views: 2 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Wednesday, May 20, 2009 6:44:07 PM         
   


> 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

If I may, I'd like to suggest an alternative: how about "old good" ADIR()? For instance:

LOCAL lcDir && Can be a paramter, i.e. LPARAMETER tcDir
&& If it's a parameter - then adjust the code accordingly
LOCAL lcFileExt, lnMax, I
LOCAL m.Folder, m.File_Name, m.File_Size, m.File_Date
LOCAL ARRAY laFiles[1]

lcFileExt = "*.*"
lnMax = ADIR(laFiles, ADDBS(lcDir) + lcFileExt)

IF lnMax = 0
   RETURN .F.
ENDIF

CREATE CURSOR C_FILES (File_Name C(20), File_Size I, File_Date D, Folder C(100))

m.Folder = lcDir

FOR I = 1 TO lmMax
   IF ATC(".D", laFiles[I, 5]) > 0
      LOOP
   ENDIF

   m.File_Name = laFiles[I, 1]
   m.File_Size = laFiles[I, 2]
   m.File_Date = laFiles[I, 3]
   INSERT INTO C_FILES FROM MEMVAR
NEXT I

That's just the idea, but HTH.
You may also want to try APPEND FROM with that array.

Regards,

Ilya

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