Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Search for a string in a group of files
Message
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00649837
Message ID:
00649848
Views:
24
This message has been marked as the solution to the initial question of the thread.
>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
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform