Multi-file text replace on Windows with free tools

I needed to replace text in a large amount of files (thousands) on a Windows workstation. Using Windows built in search to look for the text and opening each file in an editor and then making the changes is tedious and not applicable for large amount of files.

Instead, I was looking for a an application to do this automatically. It should:

  • Recursively search and replace text in a user specified folder.
  • Support regular expressions (GREP), preferably support Perl regular expressions.
  • Display the list of files that it found, alongside with their path on disk.
  • Saves a backup of the file before replacing the text.
  • Quick.
  • Free or shareware.

I found out two great free tools:

grepWin (Free, open source)

Download from: http://code.google.com/p/grepwin/

grepWin Multi-file replace tool

grepWin's Main Window

This is a great tool for search and replace.

Pros:

  • Supports all the above requirements.
  • Supports multi-line regular expressions.
  • Relatively fast.

Cons:

  • Can’t replace text when searching for plain text sentences.
  • Does not have a feature of displaying the text to be replaced on each file and asking for confirmation.

Windows Grep (Shareware)

Download from: http://www.wingrep.com/

Windows Grep Multi-file replace tool

Windows Grep main screen

Pros:

  • Supports all the above requirements.
  • Has an option to display the text that is about the be replaced for each file, and asks the user for confirmation.
  • Very fast.

Cons:

  • Unfortunately, does not support multi-line text search and/or replace.

2 thoughts on “Multi-file text replace on Windows with free tools

  1. Pingback: Tweets that mention How to Search and Replace Text on Windows with Free Tools – Yaniv's Tips -- Topsy.com

  2. Clifford Przeniczny

    I was looking for crucial information on this subject. The information was important as I am about to launch my own portal. Thanks for providing a missing link in my business.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *