1

I am looking for some free Windows software which will allow me to specify a directory and a filename mask, some text and some text to replace it it with and then to perform the replacement, optionally recursing through sub-directories.

It would be a bonus if there were a preview, preferably showing a few (user definable number) of lines before and after each match.

Multiple line / regexp would be nice.

Text files are a must, other formats a bonus.

4 Answers 4

2

You can use text-editors SynWrite / CudaText for this. They are gratis, and CT is cross-platform.

  • For SynWrite just call command "Search - Find/replace in files".
  • For CudaText need to install plugin and call it. In "Plugins - Addon Manager" install plugin "Find in Files". Example view of dialog (on Linux):

CudaText FIF plugin

1

You can use Notepad++:

  • Microsoft Windows
  • gratis
  • GUI
  • open source
  • has a preview
  • can replace a string or regular expression in all files in a directory
1

You can use sed:

1

You can use gawk:

  • cross-platform, gratis, open-source, CLI
  • can find and replace.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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