Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reading file names into tables
Message
 
 
À
29/11/2002 11:54:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00728184
Message ID:
00728227
Vues:
22
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform