Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR() on a very large directory
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00967881
Message ID:
00968462
Vues:
13
>I need to know the name of every single file in a directory
>
>I'm trying to run adir() in a very large directory about 100,000 files; the problem is that VFP array limit is 65,000 elements, so the names of the files do not fit in the array (I get an invalid subscript reference error).
>
>I could do "DIR *.* to file DIR.TXT" then extract the names from the text file. Is there any easyer way to get all the file names in the directory? or better in a string variable separated by commas?
>
>Thanks in advance

The Windows Script Host's Scripting.FileSystemObject might help. It treats files as objects and. It's fairly easy to go through the files and any store them in an array or table.

Note, however, that prior to VFP 9.0, the limit on arrays is 65,000 elements. That's a good reason to store the results in a table.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform