DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Looking for a Search & Replace utility (with command line) to replace text  (Read 5,718 times)

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
Can anyone suggest a Freeware Search and replace utility (with command line) to replace text in a text file.

Command line commands are absolutely required in this case.

Basically, I'm looking for a utility to search for expressions in a text file that are the the following formats

(46:2)
(22:3)
(1:3)

and replace them with say
(Ge 46:2)
(Ge 22:3)
(Ge 1:3)

Why I would need commandline commands is so that I could create a batch file so I can issue a string of command easily make all the changes)

Any help appreciated.

sri

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 689

patteo

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 437
Thanks Sri

In fact, by co-incidence, I was just trying out BK Replacem.

It does not exactly have a commandline, but you can define the commands in a set and call it up via the command line.

But I did find another one : It doesn't look as nice but my initial testing shows that it works.

Bulk File Find/Replace Tool
"Don’t you ever want to search many many files in nested directories and find certain text to replace with something else? Is it not tedious? Do we all not have something better to do?

So, after searching the net, I could not find a free tool and I decided it will take less time to write one than to search for one.

I created a command line tool replace.exe (which is scriptable) and decided to share it with you.

You can download the replace.exe now for free. Replace.exe is a Windows command line utility that searches files in directories to find a given text and replace with another.

Currently it does not support regular expression search, the text to search needs to be exact match, except that case sensitive or insensitive search option can be specified."
http://www.bestcode.com/html/findreplace.html

Original address: https://www.donationcoder.com/forum/index.php?topic=5678.0