How to rename multiple files at once on Mac
You don’t need an extra app to rename a folder full of photos or invoices. Finder has a batch rename tool built in, and it covers most everyday cases. Here’s how each mode works and what to do when it isn’t enough.
Quick answer
In Finder, select all the files you want to rename. Control-click (or right-click) one of them and choose Rename…. Pick Replace Text, Add Text or Format, check the example at the bottom of the dialog, then click Rename.
Rename multiple files in Finder
- Open the folder and select the files. Press ⌘A to select all, or ⌘-click individual files.
- Control-click any selected file and choose Rename…. You can also use File > Rename….
- Choose one of the three modes in the pop-up menu at the top left (explained below).
- Check the Example line at the bottom of the dialog. It shows what the first file will be called.
- Click Rename.
If the result isn’t what you wanted, press ⌘Z straight away to undo the whole batch.
Finder’s three rename modes
Replace Text
Finds a piece of text in every selected name and replaces it. Use it to fix a typo across a batch, swap Draft for Final, or remove text by leaving Replace with empty.
Example: find IMG_, replace with kyoto-, and IMG_0401.jpg becomes kyoto-0401.jpg.
Add Text
Adds the same text before or after every name. Handy for tagging a batch with a client or a date, for example 2026-11_ in front of every invoice.
Format
Replaces the whole name with a new base name plus a number or date:
- Name and Index:
Trip 1,Trip 2,Trip 3… - Name and Counter: zero-padded numbers, like
Trip 00001, which keep files sorted correctly past 9 and 99. - Name and Date: adds the current date and time.
Type the base name in Custom Format, choose whether the number goes before or after it, and set Start numbers at. Sort the folder the way you want the numbers assigned, for example by date, before you start, then spot-check a few results.
What Finder’s batch rename can’t do
- One change per pass. Want to replace text and add numbers? Run the dialog twice, and the second pass works on the first pass’s output.
- No patterns. There are no wildcards or regular expressions, so you can’t reorder parts of a name, for example turn
11-27-2026_invoice.pdfinto2026-11-27_invoice.pdf. - A one-line preview. The example shows only the first file, so a clash or an odd result further down the list is easy to miss.
Pattern-based renames in Terminal with zmv
macOS uses the zsh shell by default, and zsh includes zmv, a batch rename command that understands patterns. Load it once per Terminal session:
autoload -Uz zmv
Always run it with -n first. That prints what would happen without renaming anything:
cd ~/Pictures/Kyoto
zmv -n 'IMG_(*).JPG' 'kyoto-$1.jpg'
The part in parentheses is captured and reused as $1, so IMG_0401.JPG becomes kyoto-0401.jpg. When the preview looks right, run the same command without -n. A second example reorders US-style dates into sortable ISO dates:
zmv -n '(<->)-(<->)-(<->)_(*)' '$3-$1-$2_$4'
Here <-> matches any number. zmv refuses to run if two files would end up with the same name, which protects you from overwriting files. Terminal renames can’t be undone with ⌘Z, though, so keep the -n habit.
Prefer no command line? The Shortcuts app has a Rename File action you can combine with text actions, and you can run a shortcut from Finder’s Quick Actions. It takes some setup, but it’s reusable.
Doing it in Quarterglass
Quarterglass has a batch rename built into the file manager that sits between Finder and the command line. You stack rules in order (regex with capture groups, find and replace, numbering, dates and case changes), and a full before-and-after table checks for name clashes before anything changes on disk. Pipelines you use often can be saved as presets.
FAQ
How do I rename multiple files at once on a Mac?
Select the files in Finder, Control-click one of them, choose Rename…, then pick Replace Text, Add Text or Format and click Rename. All selected files are renamed in one go.
Can I undo a batch rename in Finder?
Yes. Press Command+Z, or choose Edit > Undo Rename, right after renaming to restore all the original names.
Can Finder rename files with wildcards or regular expressions?
No. Finder only supports plain find-and-replace, adding text, and numbering. For patterns, use the zmv command in Terminal or a file manager with regex batch rename.
How do I number files with leading zeros on a Mac?
In Finder’s Rename dialog, choose Format and then Name and Counter. Finder adds zero-padded numbers such as 00001, which keep files in order when sorted by name.