Doing search and replace for a text in a file is easy, but it will become a tedious task to do if you have multiple files in several subdirectories. You’ll need a small program to do this and I have found one small program that works like charm.
The program that we need to do multiple search and replace of text inside several files in several subdirectories is Windows Grep. If you familiar with Linux you probably already recognize that Windows Grep is the Windows version on unix’s grep command.
From Windows Grep features site:
The primary feature of Windows Grep is to search the contents of one or more files on your PC for occurrences of text strings you specify and display the results. Once found, it can replace matches with other strings.
Lists of Windows Grep feature:
- Support for beginning and expert users: In beginner mode, the Search Assistant guides you though the process of setting up and executing a search.
- Searches plain text and UNIX-style text files: Program source code, batch files, HTML, RTF and so on can be searched.
- Searches all binary files such as Word Processor documents, spreadsheets, unencrypted databases, EXEs, DLLs and so on.
- 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.
- Saving and printing of search results: Search results are displayed using HTML which allows printed output to be generated exactly the same as it appears on-screen, and results can be saved to disk in plain text or HTML format.
- Command line interface: A powerful UNIX-like command line interface allows Windows Grep to be driven from a DOS box or other Windows shell.
- Saving and retrieval of search criteria: Complex search criteria can be saved to disk for later recall to ease their repetition.
- Fully multi-tasking: Windows Grep can be minimised while a search is in progress. An icon is displayed on Windows’ Taskbar icon tray to indicate when the search is complete. Searches can at any time.
- ‘Search again’: Files found to contain matches can be easily searched again to see if they contain another, different, string.
- ZIP file searching – look in zip archives for matching files and search them.
- Delimited and fixed width data file searching at field-level.
- Explorer Extension – Launch Windows Grep directly from Windows Explorer
- Easy setup and un-installation
To download Windows Grep go here: www.wingrep.com