Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
List populated with files in a directory
Message
De
16/11/1999 16:24:50
 
 
À
16/11/1999 16:08:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00291367
Message ID:
00291628
Vues:
19
>Tks Ed for the tip. BTW, can I get adir() to pick up XX200001.dbf in addition to XX199912.dbf at one pass. Currently, I do two passes and add the second array to the 1st array. Tks

Not without pulling more than just those files - you can use standard wildcarding, and then spin through the resulting array, extracting just the ones you want by copying or deleting the unwanted rows using ADEL() and redimensioning, or use SYS(2000) to do a find first, copying the matching names to a target array and advancing through the list using the added ,1 parameter to do a find next.) Wildcarding in ADIR() is limited to the * and ? conventions; it'd be nice to be able to use a regular expression parser, but it's just not available here.

You could do much the same thing using the Scripting.FileSystemObject to return a Folder object, and then spin through its Files collection.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform