Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Reading file names into tables
Message
From
29/11/2002 13:52:53
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00728184
Message ID:
00728227
Views:
20
>David,

>You can read the directory contents into an array using adir() then loop through each row appending the contents to your table.
>LOCAL ARRAY laFilename[1]

>lnTotalFiles = adir(laFilenames, "*.*")

>for lnFile = 1 to lnTotalFiles
>   insert into mytable (filename, size, attributes) ;
>      values (laFilenames[1], laFilenames[2], laFilenames[5])
>endfor
>Or something similiar to the snippet above.

>Hope this helps
>Neil

Similar like this?
IF ADIR(laFiles,"*.*","A") > 0
    CREATE CURSOR cFiles (cFileName c(50), iFileSize i,;
                          dLastMod d, cTimeMod c(8), ;
                          cFileAttrib c(5))
    INSERT INTO cFiles FROM ARRAY laFiles
    BROWSE
ENDIF
Apoya a Visual FoxPro usandolo legalmente
--
¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º
Espartaco Palma Martínez
SysOp PortalFox
http://www.portalfox.com
esparta@portalfox.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform