FileDial › Guides › Archives, folders and renaming
How to batch rename files on a Mac
By Himanshu Ranjan · Updated 8 November 2026
In Finder, select the files, Control-click and choose Rename to replace text, add text or apply a format. For patterns, regex and undo across any file type, FileDial has Rename › Rename with pattern… and several one-click tools. All offline.
Finder's built-in option
Apple documents it: select the files or folders, Control-click one and choose Rename. A pop-up under Rename Finder Items offers three modes. Replace Text swaps text you type in a Find field for text in a Replace with field. Add Text puts text before or after the current name. Format applies a name format with an index, counter or date, a custom format and a starting number.
For a quick tidy of similar files this is enough, and nothing needs installing.
When to reach for FileDial
Finder's tool is basic. FileDial's Rename category has more, and its notes say each renames the originals, with Undo available on the result.
- Rename › Rename with pattern…: date, sequence number and find/replace in one go; undo puts them back
- Rename › Replace text in names…: extensions are left alone
- Rename › Regex rename…: extensions are left alone
- Rename › Lowercase names and Rename › Remove spaces (spaces become underscores)
- Rename › Version bump: name_v02 becomes name_v03, others get _v01; the original stays
Steps for a pattern rename
Try it on a copy of a few files first.
- Select the files in Finder.
- Hold the right Option key and choose Rename, then Rename with pattern…
- Set the date, sequence or find-and-replace parts of the pattern.
- Check the preview, run it, and use Undo on the result card if it is not right.
Names that travel well
Filenames cause real bugs. Spaces need quoting in shells, Windows forbids characters such as / \ ? * : | and quotes, and Mac, Windows and Linux differ on case sensitivity. macOS's default file system is case-insensitive but case-preserving.
The most portable names use letters, digits, period, underscore and hyphen. Rename › Remove spaces and Rename › Lowercase names get you most of the way.
More specific jobs
Adding dates and numbers have dedicated guides: see our guides on adding dates to filenames and numbering files in sequence. For photos named by when they were taken, Rename › Rename by date taken exists, and Convert › Rename by content… names documents from their date, company and number.
Choosing the right tool for the job
Match the tool to the change. A shared word to swap in many names: Rename › Replace text in names… Messy capitals or spaces: Rename › Lowercase names and Rename › Remove spaces. A consistent scheme with dates and numbers: Rename › Rename with pattern… Something conditional, such as removing a prefix of digits: Rename › Regex rename… Version suffixes for drafts: Rename › Version bump.
For quick, one-off tidy-ups on a small set, Finder is faster because it is already there. Reach for the dial when the rule is complex, when files are mixed types, or when you want the result card and Undo.
- Swap a phrase: Replace text in names…
- Strip spaces for web or scripts: Remove spaces
- Date and number scheme: Rename with pattern…
- Pattern-based edits: Regex rename…
- Drafts: Version bump
Common mistakes and when FileDial fits
Renaming without a plan is how links break. Documents that reference each other by name, photo libraries that point at original files, and scripts that expect names all fail when names change. Rename a copy first if anything else depends on the names.
Do not rename system folders or app bundles. Be careful with regex: test on two files first. And remember that extensions matter, so the tools that leave extensions alone are the safer choice for find-and-replace. Finally, Finder's undo works only until you do something else in Finder, so rely on FileDial's Undo on the result card when you want a longer safety net.
If you rename once a month with simple find-and-replace, Finder is enough and it is already there. If you rename often, need dates and numbers, use regex, or want a reliable undo, FileDial's Rename category is the better fit.
An honest limit: renaming never fixes the underlying mess. If your folders lack structure, pair renaming with Batch › Sort into folders by type or by date, which copy files into sorted folders without touching the originals.
A convention makes later renaming easier. Start names with the date in year-month-day order so folders sort by time. Use a short project or client name next. End with a version marker such as v01, which Rename › Version bump advances to v02 and v03 as a new copy while the original stays. Use hyphens or underscores instead of spaces if scripts or web servers will touch the files, and keep names short enough to read in a narrow Finder column.
The point is to make the next rename unnecessary. A few minutes spent on a scheme saves hours across a year of files.
Questions
Can I undo a batch rename on a Mac?
In FileDial, every result has Undo, including renames, and the pattern tool's note says undo puts the names back. In Finder, pressing Command-Z works only while the rename is still your most recent action, so do it immediately and before doing anything else in Finder.
Will the rename change file extensions?
Rename › Replace text in names… and Rename › Regex rename… leave extensions alone, according to their notes, which protects you from accidentally turning a .jpg into something the Mac cannot open. If you do want to change an extension, convert the file with the proper tool instead of renaming it.
Is there a way to rename with a regular expression on a Mac?
Yes, with Rename › Regex rename… Finder's built-in rename offers Replace Text, Add Text and Format, but no regex mode. Test the pattern on two files first, since regular expressions are precise and a small mistake affects every file in the selection.