fnr.exe - Find And Replace Tool
C# HTML Batchfile
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
docs Update aside.html Jul 25, 2018
docs2/pages Update basic-usage.md Aug 6, 2018
lib Migrate codeplex to github Nov 13, 2017
src Version 1.8.1 Jun 22, 2018
.gitattributes Add ignore file Nov 28, 2017
.gitignore Move sign directory Jan 21, 2018
LICENSE Update LICENSE Nov 13, 2017
README.md Update README.md Feb 20, 2018



Project Description

An open source tool to find and replace text in multiple files.


  • Single file download - fnr.exe (181kb)
  • Replace text in multiple files using windows application or through command line
  • Find Only to see where matches are found
  • Case-sensitive searching
  • Searching for files in one directory or recursing sub-directories
  • Regular expressions
  • Find and replace multi-line text
  • Generate command line button to create command line text to put in batch file
  • Command line help
  • Unit tests of Find/Replace engine



For screenshots I used a common scenario of replacing a ConnectionString in all ConnectionStrings.config in the solution when rolling from staging to production.

Screenshot 1: Finding all occurrences of connection string.


Screenshot 2: Replacing all occurrences of connection string.


Screenshot 3: Generating command line text to run "Replace" using batch file


Screenshot 4: Viewing command line options


Screenshot 5: Finding occurrences using command line.


Screenshot 6: Replacing occurrences using command line.



A couple of months ago I set out to find a simple find and replace tool that I could use when rolling out my projects. For ex. to change various settings in config files to support dev/qa/prod environment.

I was looking for something that would have the following features:

  1. Simple UI to make sure that find/replace does what I need it to
  2. Command line to run find/replace using batch file.

There are many tools available, but they all have the following major issues:

  • Out of date, no updates support for at least a year

for ex. http://www.divlocsoft.com/

  • Bad documentation if any. Many apps mentions that they have command line support, but to find out how it works takes too much effort.
  • Too many features. I just need to type in a couple of fields and click on Run, not to learn a new language.

for ex.
grep/sed variants in windows

  • No access to code. Many tools have 90% of what I need, but if I need just a bit more (support for multi-line) - there is not much I can do.

So I wrote a simple tool to use in my own projects and wanted to share it with others.

Shameless plug for my company: http://www.entechsolutions.com