Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A Simple Way to Get a List of Files?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00215025
Message ID:
00215029
Vues:
29
>Greetings!
>
>I may be missing something, but I cannot determine how to retrieve a list of files of a given type, such as "*.dat". Visual Basic has its DIR$() function, which retrieves the first or next file of a given series, depending on a supplied parameter.
>
>Aside from commands like DIR in VFP, is there a method or function to load a list of files from a directory into, say, an array, without the need of doing fancy parsing of a redirected output file?
>

Take a look at ADIR(), which retrieves an array of filenames for a specified directory; there is also SYS(2000), which provide a Find First/Find Next capability. And you can also use any of several automation objects (Shell.Application, part of Windows' Shell version 4.71 or greater and Scripting.FileSystemObject, part of the Windows Scripting Host) can return Folder objects that you can manipulate.

>Thanks!
>
>Michael Reynolds
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