20

I have 20 text files with various extensions in a directory.

I want to replace "nnn" with "ooo" in all files.

I could import them into a project in Eclipse or Visual Studio to replace them all but that is overkill and would add other meta files etc.

What is a simple way to do this, I'm thinking: select all files, right click, choose some tool called (e.g. "QuickReplacer") and fill in find and replace, click and done.

Does anyone know of a tool like this?

1
  • 1
    I'd like to point out that if you're already using Eclipse, bringing up the Find in Files (or whatever it's called) you can choose a Directory, rather than an existing project, to search. It shouldn't be hard from there to then run a find/replace on matched files. – anonymous coward Jul 31 '09 at 13:58
8

GrepWin would do this among others, and it is a Explorer plugin.

However there is quite a big array of different applications available that can do this.

This SO thread on the topic also suggest WinGrep as an option.

1
  • installed it and did my search/replace within 3 minutes, thanks! – Edward Tanguay Jul 31 '09 at 12:02
25

Notepad++ can do it easily...

Search menu → Find in Files... menu item.


In Notepad++ 7.9.2

Go to

FileOpen Containing FolderFolder as Workspcae

Right click on your folder and select Find in Files...

In Find in Files dialog, click on tab Find in Files and fill your keyword in Find what then fill the replacement in Replace with and click on Find All button to find all occurrences keyword in all files, or Replace in Files button, to replace all occurrences of keyword with its replacement.

4

If you are familiar with Visual Studio, you can do that without creating a project. Do (something like): Edit>Find/Replace>Find in Files. There you can specify a folder.

I've done this many times. I'd say it's only overkill if you had to create a project (you don't) or if you didn't have VS installed and needed it only for this request.

2

I find that Textpad is very useful for this kind of thing, amongst others.

2

Sublime: Ctrl+Shift+f

Replaces text in all open files, or you can specify particular folder(s) by clicking .

Afterwards, hit File > Save All.

0

I really like the WildEdit product by Helios Software (makers of the excellent Textpad text editor).

It's reliable, quick, flexible, and doesn't cost much (£8.50 = approx. 10 Euro) - well worth its price!

It handles ASCII, ANSI, UTF-8 and other encoding with no problem, you can pick a directory and a file mask (*.cs, *.as?x etc.) and apply the changes only to those files, and it will keep a backup of your original files in case you want to undo the change.

Marc

0

SciTE has this built in on Windows - so long as all the files are in the same directory (and is a very small and quick general purpose text editor into the bargain) - right click and 'Edit with SciTE' any one file in the directory, Ctrl+Shift+F, type in search and replace strings and an optional filename filter and click OK.

0

I know I'm a bit late to the Party, Just wanted to Mention this great free tool. http://dngrep.github.io/

1
  • Thank you! This is a very useful tool, it will help me to save a lot of time! – Sergio Prats Nov 19 '20 at 16:50
0

Try Text Replacer, take a look at this page : https://textreplacer.g-software.ma

Text Replacer

Text Replacer

Not the answer you're looking for? Browse other questions tagged or ask your own question.