For Linux, sed and find are an easy option to search and replace in many files including subdirectories. Is there a way to do the same in Windows (with or without PowerShell)?

link|improve this question

67% accept rate
feedback

5 Answers

up vote 3 down vote accepted

While PowerShell is certainly capable of this, have you considered using the UnxUtils Win32 ports?

http://sourceforge.net/projects/unxutils/

link|improve this answer
a great collection of world famous tools :) – mjn May 10 '10 at 19:01
feedback

Many text editors/programming IDEs include advanced Find/Replace functionality that will do exactly what you're looking for. A couple that I have used and have been pleased with include Notepad++ and Visual Studio

link|improve this answer
I love Notepad++ however for this task I need a scripting utility – mjn May 10 '10 at 19:02
feedback

When I needed it, I used Windows Grep application http://www.wingrep.com that not only searches, but replaces as well

link|improve this answer
feedback

My favourite utility is fart.exe. (Find And Replace Text.exe)

Here is a link http://fart-it.sourceforge.net/

Gotta love the logo...

link|improve this answer
feedback

My fav for this purpose is SFK (Swiss File Knife).

I've employed it for finding injected code patterns in files on web servers searching from the drive root all the way through the subdirectories.

Works great.

http://stahlforce.com/dev/index.php?tool=sfk

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.