I need a free program that can scan all .xml files in a directory and replace a certain string occurrence.

link|improve this question

feedback

2 Answers

up vote 4 down vote accepted

Assuming you use Windows, Windows Grep can do this! It's free.

Replacing as well as searching: Once you have performed a search you can change the matches found to another string in all files or a single file, quickly, easily and safely. In beginner mode, the Replace Assistant gently guides you through the process.

link|improve this answer
Indeed. As any other find & replace software. I'd like to call the attention also to TextCrawler (digitalvolcano.co.uk/content/textcrawler) which includes a very(!) useful Regular Expressions Test Tool and a library of commonly used regular expressions. – A Dwarf Sep 30 '09 at 9:51
the "windows grep" free version is supposed to be used for eval purpose. They encourage you to register! – anjanbacchu Jul 22 '11 at 14:21
feedback

Use sed:

find /dir -type f -exec sed -i 's/old/NEW/g' {} \;

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.