Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Invalid subscript reference
Message
De
30/11/2006 17:12:27
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01173721
Message ID:
01173914
Vues:
6
>>Why not try something like this:
>>
>>CREATE CURSOR crsTest (FieldName M)
>>lcFileName = SYS(2000,[*.*]) && All files
>>DO WHILE NOT EMPTY(lcFileName)
>>   IF LIKE(UPPER(myStemPart), UPPER(JUSTSTEM(lcFileName))) OR;
>>      LIKE(UPPER(myExtPart), UPPER(JUSTEXT(lcFileName)))
>>      INSERT INTO crsTest VALUES (m.lcFileName)
>>   ENDIF
>>   lcFileName = SYS(2000,[*.*],1)
>>ENDDO
>>
>
>There are 13173 jpg files in that folder and the total time took 30 sec.

That seems reasonable for such a long list.

You might also consider to divide your files into more folders, to make it more manageable. Even looking at the files in Windows Explorer can take a long time with such a long list.

Splitting folders might be convenient even if you were already working with VFP 9, which doesn't have this array limit.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform