Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to search and replace in files...
Message
 
 
To
11/05/2004 17:36:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00903002
Message ID:
00903006
Views:
19
This message has been marked as the solution to the initial question of the thread.
Hi Marc,

You can use filer.dll that comes with VFP to find files. The sample code from Re: Search entire drive for a file Thread #759634 Message #759660 should get you started. After that you can loop through the file list and use FILETOSTR(), STRTRAN() and STRTOFILE() to do actual replacement.

>What is the best way in code to scan a directory of files,
>and search a string in each file, and replace that string by another one?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform