Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adir function
Message
De
07/12/1998 07:35:55
 
 
À
07/12/1998 07:14:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00164664
Message ID:
00164668
Vues:
32
>Hello:
>
>I'm trying to list everything in an array from a directory except
>.fpt files. I want to know if I can do this with the adir function or
>can I list everything and then delete all .fpt files and then redimension the array. Does anybody know how I can go about doing this? Any help would be greatly appreciated. Thanks


The quickest way to do this is probably to use ADIR() to populate an array, append it to a cursor, and then copy the content of the cursor back to an array, something like:
CREATE CURSOR Temp (fname C(100), fsiz I, fdate D, ftime c(8) fattr c(8))
=ADIR(aFileList,'C:\MyDirTOCheck\*.*')
APPEND FROM aFileList
DECLARE aFileList[1,5]
COPY TO ARRAY aFileList FOR ! '.FPT'$fname
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