Search and replace text in multiple files

Step-by-step guide to search-and-replace in many text files at once

Select the desired text files

First, switch to the "Files" tab and add the text files you want to process. Alternatively, you can add a whole folder and use the filter to narrow down which files to edit. For example, you can include only files with the "txt" extension, so that search-and-replace runs on those alone.

Add text files for editing

Select actions to edit the text

Next, choose the actions you want to apply to the text files. Click the button with the (+) symbol to add each action to the action list.

Replace old with new text

Search-and-Replace only one search term

To replace just a single term or string in the files you added, choose the action "Edit text -> Replace". In the left pane of the Action Settings, enter the search term to look for; in the right pane, enter the text that should replace it. You can decide whether the replacement applies only to a specific occurrence or to every occurrence, and whether to match case and limit the search to whole words.

Simple Search and Replace

Multiple Search-and-Replace

To replace several terms or strings at once across the files you added, choose the action "Edit text -> Other -> Multi-Replace". Enter each pair line by line: the original search term and the text it should be replaced with. Here too, you can choose whether to ignore case and match whole words only.

Multiple Search and Replace

Review changes in the Preview

The effects of your editing actions appear in the preview area in real time, so you can check the edited text of the currently selected file. Switch to the "Files" tab for an overview of all planned changes, and select any file in the list to load it into the preview and review the replacements for that file.

Check text editings

Save edited text files

Finally, click the "Save ..." button to open the Output dialog, which lists every file queued for processing. Only the files that actually changed are saved. If "Backup files in ZIP archive" is enabled, you can undo unwanted changes later — either for the selected file or for all of them.

Save edited text files
Try Batch Text Replacer now for 30 days...     Go to the download page