Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Retreiving filenames from directories
Message
De
26/02/1999 19:56:06
 
 
À
26/02/1999 15:41:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00192142
Message ID:
00192226
Vues:
24
>How do I retreive each file name under a particular directory and add those names to a VFP table?

You can use ADIR() to retrieve the list of files into an array, and then append the array into your table. There are also automation objects like Scripting.FileSystemObject that can make traversing an entiure folder hierarchy fairly easy.

Try ADIR() first; if you want to investigate Scripting.FileSystemObject, install the Windows Scripting Host, and look at the MSDN topic FileSystemObject object. You might also take a look at the Web site http://cwashington.netreach.net/home.htm for some good discussions on scripting and the scripting host in detail.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform