Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Suggestions for a command line search-and-replace tool on Windows

I am looking for a Windows tool (exe) or Python script which can be used on the command line to search and replace strings in text files recursively in a source code tree. I am trying to avoid the custom syntax of sed/awd like linux tools. It needs to be automated, therefore it needs to be command line.

Any suggestions?

like image 355
Paul Avatar asked Jun 19 '09 14:06

Paul


People also ask

What command is used for replace?

To use Find and Replace, use the shortcut Ctrl+H or navigate to Editing in the Home tab of the ribbon, then choose Replace.

What is the Replace command in Windows?

In computing, replace is a command that is used to replace one or more existing computer files or add new files to a target directory. Files with a hidden or system attribute set cannot be replaced using replace .


2 Answers

I think WinGrep may meet your needs. I believe it can be run from the command line. Link: www.wingrep.com

like image 117
Brian Sullivan Avatar answered Oct 21 '22 12:10

Brian Sullivan


A little pricey, but PowerGrep has a command line interface or so the manual says.

like image 36
Jay Atkinson Avatar answered Oct 21 '22 12:10

Jay Atkinson