Find & Replace: Batch Rename with Regex on Mac

Batchio's find and replace rule lets you search for any text pattern inside your filenames and swap it instantly across hundreds of files. Whether you need a straightforward word replacement or a complex regex transformation with capture groups, every change appears in the live preview before you commit.

How does find and replace work in Batchio?

Type the text you want to locate and what to replace it with. Batchio matches the exact string in every selected filename and swaps it instantly, with a live preview showing the result before you apply. Toggle regex mode to use full regular expressions instead of plain text.

Plain text mode is the fastest way to fix a common naming mistake or swap one word for another across an entire folder. Enter your search term, type the replacement, and Batchio highlights every match in the file list. The live preview updates in real time, so you can confirm the result before renaming a single file. This mode works best when you know the exact text you want to change and there is no ambiguity in the match.

You can also leave the replacement field empty to delete the matched text entirely. This is a quick way to strip unwanted tags, version numbers, or copy suffixes from batches of downloaded files. For instance, removing "(copy)" or "(1)" from duplicated files takes just a few keystrokes, and the result is visible immediately in the two column preview.

How do you use regex capture groups for file renaming?

Toggle regex mode and write a regular expression with parenthesized groups. Reference matched groups in the replacement field using $1, $2, and so on to restructure filenames with precision.

Regular expressions unlock pattern matching that plain text cannot achieve. When you enable regex mode in Batchio, the search field accepts any valid regular expression, and the replacement field supports back references like $1, $2, and $&. For example, the pattern (\d{4})-(\d{2})-(\d{2}) with replacement $3.$2.$1 converts a date format from 2026-03-26 to 26.03.2026 in every filename at once. This approach lets you rearrange, extract, or reformat segments of a filename without losing any information.

Capture groups become even more powerful when combined with other rules. You might use regex find and replace to restructure the base name, then chain an Add Text rule to prepend a project code. Because every rule in Batchio is composable, you can build multi step renaming workflows that execute in a single pass.

What is the difference between matching first and all occurrences?

Use the match mode selector to replace only the first occurrence of the pattern in each filename or every occurrence at once. This prevents unintended replacements when a pattern appears more than once in the same name.

Some filenames contain repeated patterns. For example, a file named report_draft_draft_v2.docxhas the word "draft" twice. If you only want to remove the duplicate, set the match mode to "First" so that only the first instance is replaced and the second remains. Setting it to "All" replaces every occurrence, which is the right choice when you want to eliminate a pattern completely.

This option is especially valuable with regex patterns that may match more broadly than expected. The live preview shows you exactly which parts of each filename will change, so you can switch between first and all matches while watching the results update in real time. Having this level of control means fewer surprises when you click the rename button.

Can you do case sensitive find and replace on filenames?

Yes. The case sensitivity toggle controls whether the search distinguishes between uppercase and lowercase letters. Turn it off to match "Photo", "photo", and "PHOTO" with a single search term.

By default, Batchioperforms a case sensitive search so that "IMG" and "img" are treated as separate strings. When you disable case sensitivity, the search matches all letter casing variations, which is useful when filenames have inconsistent capitalization from different cameras, apps, or operating systems. This works in both plain text and regex modes.

After replacing the matched text, you may want to normalize the casing of your filenames further. The Remove Characters rule can strip leftover artifacts, and the live preview confirms every modification before you apply. Our regex renaming guide covers advanced patterns and capture group techniques in detail.

Rename Smarter With Regex and Live Preview

Stop renaming files one by one. Batchio gives you the power of regex find and replace with a real time preview so every batch rename is safe and predictable.

Coming Soon to the Mac App Store
Marcel Iseli
Marcel Iseli

Creator of Batchio · Indie App Developer

LinkedIn ↗

Marcel Iseli is an indie app developer and the creator of Batchio. He builds native macOS utilities focused on productivity and file management, with a focus on lightweight, subscription-free tools.