Windows: Find And Replace Text Command Line Utility

FART or Find And Replace Text command line utility is a Windows improved version of the well-known ‘grep‘ command, with advanced features such as: case-adaption of the replace string; find (and replace) in filenames or auto CVS edit. You can download from Sourceforge and integrate it into your Windows environment.

Why We Need This?

For me, Windows Server 2008 R2 search tool is not really good, where its hard for me to find/replace some text into all files in certain directory recursively. Since I have experience in managing Linux box (using command line), it is really convenience to have something command-line based to do this for you.

Lets say something wrong happen to your website, which being injected, similar to this post, but happen in Windows server, then this is what you need.

Here is my environment:

OS: Windows 2008 R2 64bit
Directory: C:\user1\public_html
Infected files: All .html files under this directory
Infected code: “<script src= ></script>”

1. Download the application at Sourceforge,

2. Extract the zip files somewhere and you will see there is one file inside called fart.exe. Move or copy it to C:\Windows\system32.

Continue reading “Windows: Find And Replace Text Command Line Utility” »