Replace text in many files

Preview text replacements in a fixed set of found files, then apply selected changes.

Find the files first, then preview replacements in those results. MeiFiles checks the changes before writing them.

Replace in Found Files showing selected text matches and the backup option before replacement.Replace in Found Files showing selected text matches and the backup option before replacement.

Open a replacement preview#

  1. Run a search in Find Files.
  2. Check the results. If you changed the search draft, run Search again.
  3. Click Replace in Results….
  4. Enter Find text and Replace with.
  5. Set Case sensitive if needed, then click Preview Changes.

The replacement window uses a fixed set of found regular files. Directories and archive entries are excluded. It does not search additional files elsewhere. The first positive content condition supplies the initial Find text when available.

The replacement search is plain text. A regex used to find filenames does not turn the replacement into a regex substitution.

Choose changes#

Matches are grouped by file with line numbers and before/after text. Turn off a match to keep it unchanged. Select All and Deselect All change the match checkboxes.

Leave Create backups (.bak) on to preserve the originals. Click Replace Selected, or choose Replace All and confirm.

The result reports replaced matches and files left unchanged. Files that changed after preview, cannot be read or cannot be backed up are reported with a reason. Preview again before retrying.

Text formats and recovery#

UTF-8 and BOM-marked UTF-16 are supported. Replacements preserve the original encoding and BOM. Unsupported formats are skipped. PDF and Office document text is not extracted.

Replacement cannot be undone with Undo File Operation. Keep backups if you may need the original text.

See also#

Search MeiFiles guide

Search the user guide.