Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADIR() on a very large directory
Message
De
10/12/2004 07:27:43
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00967881
Message ID:
00968252
Vues:
11
This one is perhaps one day too late for you, but not too late for the archive...

Go through the alphabet, or even better through the ascii-set, like in...
for n = 1 to 255
    nFnd = adir( aFile, chr( n ) + '*.*' )
    if nFnd > 0
        * process them
    endif
next
>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
Groet,
Peter de Valença

Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform