Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search for a string in a group of files
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00649837
Message ID:
00650411
Vues:
25
>>Anyone know the VFP syntax for an API or WSH function that will return an array of filenames whose contents contain a specified string? TIA!
>
>You can use Filler.dll that comes with VFP.
oFiler = CREATEOBJECT('Filer.FileUtil')
>oFiler.SearchPath = "H:\temp"
>oFiler.FileExpression = '*.PRG'
>oFiler.SearchText1 = "LOCAL"
>?oFiler.Find(0)
>? oFiler.Files.Count
This works great as long as the files are text files. It does not work on ZIP [or any binary?] files.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform