VBS has a great function - replace. Next VBS script lets you replace string in a text file. Replace works with text compare (case insensitive). Use:
[cscript|wscript] replace.vbs Find Replacewith File Find … Required. Substring being searched for. Replacewith … Required. Replacement substring. File … Source and destination file for the replacement
for 'Replace one string to another in a text file' article
Copyright and use this code
The source code on this page and other samples at https://www.motobit.com/tips/ are a free code, you can use it as you want: copy it, modify it, use it in your products, ...
If you use this code, please:
1. Leave the author note in the source.
2. Link this sample from you page.
<A Href="https://www.motobit.com/tips/detpg_replfile/" Title="This script let's you replace string in a text file using VBS and FSO." >Replace one string to another in a text file</A>
© 1996 - 2019 Antonin Foller, Motobit Software | About, Contacts | (Find us on Google+)