Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question
add comment

5 Answers 5

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/

share|improve this answer
add comment

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

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

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

share|improve this answer
add comment

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

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

Gotta love the logo...

share|improve this answer
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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