I’m hoping someone might lend their time in helping me create a batch file or similar for finding and replacing text in several files.
I have tried many “search and replace” utilities but have not found something that does what I need.
The requirements are as follows:
Find and replace the SAME text in multiple files with different text FOR EACH FILE.
Example:
File1.txt, file2.txt, file3.txt all have a text string “change me please”
for file1.txt replace text string “change me please” to “file1 changed” save as original filename (file1.txt)
for file2.txt replace text string “change me please” to “file2 changed” save as original filename (file2.txt)
for file3.txt replace text string “change me please” to “file3 changed” save as original filename (file3.txt)
Best Answer
Using PowerShell commands:
leaves me with the 2 files:
Could some kind person tell me how I would then rename these files and overwrite the originals: