Replace Text in Files - Find and replace text across many files at once, with an optional file rename (Updated Oct 2026)
Description:
Replace Text in Files finds and replaces text across one file or a whole folder of files in one go — for example a company name, a phone number, a web address or a setting in every page of a website. You can make several replacements at once, use regular expressions, preview every match before anything changes, keep a .bak copy of each file, rename files too, and choose the encoding and line endings of the result. Every change can be undone later from the Change Journal.
How to use:
1. Under
Source, click
Browse File... to pick one file or
Browse Folder... to pick a folder (recent locations are kept in the list). For a folder, set
File types (for example
*.html;*.txt), tick
Include Subfolders to reach nested files, and list anything to skip in
Exclude.
2. In
Search & Replace Pairs, enter each
Search For and
Replace With pair, one per row, and tick the rows to use.
+ Add Row,
− Remove Selected and
Clear All manage the rows; all ticked rows are applied in order to each file. Leave Replace With empty to delete the text.
3. Choose how matches work:
Case sensitive,
Whole word, or
Regex to treat each search as a .NET regular expression (use $1, $2 in Replace With for captured groups).
4. Set the options:
Also rename files applies the first pair to file names too,
Backup (.bak) keeps a copy of each file before it changes,
Dry run (preview only) makes Replace All change nothing, and
Output encoding /
Line endings choose how changed files are saved (by default they keep their original encoding and line endings).
5. Click
Preview to see every match, file by file, in the
Details Log without changing anything. When you're happy, click
Replace All and confirm.
Cancel stops a run in progress;
Clear Log and
Export Log manage the log.
6. Use
Preset with
Save,
Load and
Delete to keep named sets of pairs, and
Import... /
Export... to share them.
What You Can Do With This Program
Potential Uses for Replace Text in Files Tool:
- Mass Content Updates Across Many Files:
- Update a company address, phone number, URL or product name everywhere it appears across a collection of documents, templates or code files — all in one pass, with a preview first.
- Use multiple search/replace pairs together to make several changes at once, and save them as a preset to reuse.
- Standardising Naming and Content Conventions:
- Bring consistency to files across large projects or archives by replacing old patterns with new, standardised ones — and tick Replace in filenames to update the file names to match.
- Enforce personal or team naming rules for better searchability.
- Batch Correcting Typos or Errors:
- Fix a recurring spelling mistake or wrong term across many files at once (for example correcting "Documentt" to "Document"), with a backup kept in case you need to revert.
- Updating Project or Brand Names:
- When a project is renamed or a brand changes, instantly update the references in file contents and, optionally, in the file names too.
- Advanced Pattern Replacements:
- Use regex with capture groups to reformat data (for example reordering dates or codes), or the "between markers" syntax to replace or delete a whole block between two markers.
- Preparing Files for Migration or Reorganisation:
- Adjust paths, references or naming inside files before moving them to a new system, and normalise the text encoding or line endings at the same time.
- Web and Content Housekeeping:
- Optimise asset file names or update repeated snippets across many pages or templates, using the file-type filter to target only the relevant files.