Quantcast
Channel: Spiceworks Community - Latest topics
Viewing all articles
Browse latest Browse all 182949

Find strings in multiple files and replace them

$
0
0

Hello,
I would like to know how could I find strings in multiple files which strings are stored in a txt file and rewrite them in all files.
For example:
There are 2 files in C:\temp: Colors1.txt, Colors2.txt

Colors1.txt with these strings:
red
green
blue
purple


Colors2.txt with these strings:
yellow
red
brown
purple

And I have an other „find.txt” file with the strings which I would like to find and rename them to the 2nd coloumn:

red red_good
purple purple_good


I should get the following results:
Colors1.txt:
red_good
green
blue
purple_good


Colors2.txt:
yellow
red_good
brown
purple_good

Thanks in advance!
iDrew



Viewing all articles
Browse latest Browse all 182949

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>