Need to find/replace text in multiple files

Crafty35a

Senior member
Feb 2, 2003
253
0
76
I have hundreds of text files (wel, not actually text files, but they just contain plain text) in which I need to replace a particular string of text with another string. I just need a utility to allow me to do this, hopefully just letting me set it loose on a folder containing many files. Anyone know of one?

Thanks!
 

quikah

Diamond Member
Apr 7, 2003
4,179
729
126
sed will do what you want. Do you have a Linux box nearby? That has sed on it.

If the version of sed you have has in-place editing you just do:

sed -i 's/string1/string2/g' *


You can do lots of cool stuff with it when combined with some shell scripts.
 

Fardringle

Diamond Member
Oct 23, 2000
9,200
765
126
UltraEdit has a find and replace function that will let you search all files in a folder (or your entire hard drive if you want to) and replace all instances of a text string that it finds.