Mac maintenance
How to Batch Rename Files on Mac (Built-In, No App Needed)
macOS has a built-in batch rename tool that handles patterns, sequences, and find-replace. Here's how to use it to rename hundreds of files in seconds.
You’ve got 80 photos named IMG_4027.jpg through IMG_4106.jpg and you want them named Vacation-001.jpg through Vacation-080.jpg. Or 50 invoices that all need a date prefix. The free apps for this are clunky, the paid apps are overkill, and macOS has had a perfectly good batch rename feature built into Finder since 2014.
Here’s how to use it for the most common patterns, plus the cases where you’ll want to drop to Terminal.
Open the batch rename tool
It’s hiding in plain sight. Select multiple files in Finder, right-click, and pick “Rename [N] Items” from the menu.
A small panel appears with three modes in a dropdown at the top: Replace Text, Add Text, and Format. Each does what its name suggests.
Hit Return or click Rename to apply. Esc cancels. Like most Finder operations, batch rename is undoable with Cmd+Z for a few minutes after.
Replace Text mode
This is find-and-replace for filenames.
- Find: type what you want to remove
- Replace with: type what you want to put there instead
Example: filenames like Old_Project_Draft_01.pdf, Old_Project_Draft_02.pdf — set Find to “Old_Project_Draft” and Replace with “Q1_Report” and they all become Q1_Report_01.pdf, Q1_Report_02.pdf.
Leave Replace empty to just remove text. Set Find to “DRAFT_” and Replace empty, and “DRAFT_invoice.pdf” becomes “invoice.pdf.”
Use this for cleaning up downloaded files with junk prefixes, removing version numbers, or normalizing naming conventions across a folder.
Add Text mode
Adds a string to every selected filename. Two options:
- Add to: before name, or after name
- Text: what you’re adding
Common uses:
- Add date prefix:
2026-04-12_before name →2026-04-12_invoice.pdf - Add status suffix:
_FINALafter name →proposal_FINAL.docx - Add client tag:
[ClientA]_before name
When you’re adding text after the name, macOS is smart enough to insert it before the file extension — _FINAL after proposal.docx gives you proposal_FINAL.docx, not proposal.docx_FINAL.
Format mode
This is the powerful one. It replaces the filename entirely with a pattern, optionally with a sequential number or date.
Format options:
- Name Format: Name and Index, Name and Counter, Name and Date
- Custom Format: the base name to use
- Where: before name (puts the number in front) or after name
- Start numbers at: the starting integer
So selecting 50 files, Format → Name and Index → Custom Format “Vacation” → after name → start at 1 gives you:
- Vacation 1.jpg
- Vacation 2.jpg
- … up to Vacation 50.jpg
The difference between Index and Counter:
- Index uses the natural number (1, 2, 3…)
- Counter uses zero-padded numbers (00001, 00002, 00003…) — useful for files that need to sort correctly when there are more than 99 of them
For most uses, Counter is what you want. “Vacation 1” through “Vacation 100” sorts wrong in Finder (“Vacation 1, Vacation 10, Vacation 11… Vacation 2, Vacation 20”). “Vacation 001” through “Vacation 100” sorts correctly.
Date inserts the current date or file modification date in the filename, which is useful for batch-archiving files with timestamps.
Rename order matters
When using Format mode, the order in which files are renamed is the order they’re currently sorted in Finder. So if you want files renamed Vacation 001 through Vacation 050 in chronological order, sort by Date Created or Date Modified before opening the rename dialog.
If you want a specific manual order, use icon view, drag the files into the order you want, then run the rename.
This is the gotcha that catches people. The rename tool itself doesn’t have a “sort by” option — it inherits whatever sort order Finder has at that moment.
Combine modes by running multiple times
Each mode does one thing. To do something complex, run rename twice.
Example: you want to take 30 files named screenshot 2026-04-XX at HH.MM.ss.png and turn them into Project_Screenshot_001.png through Project_Screenshot_030.png.
- First pass: Format mode → Name and Counter → Custom Format “Project_Screenshot” → start at 1 → padded → done
- The files are now
Project_Screenshot_00001.pngetc., which is fine
Or do it in one pass with smarter format setup. Either way, batch rename is composable — you can run it multiple times to get the result you want.
Preserve extensions
Finder’s batch rename always preserves the file extension. You can’t rename image.jpg to image.png with this tool — it’ll only let you change the name part before the extension.
To change extensions in bulk, you’ll need to drop to Terminal or use a tool like A Better Finder Rename. Or rename one file’s extension manually first to test, then use Terminal for the rest.
To actually convert file format (not just the extension), use Preview’s batch export or sips in Terminal.
Rename files inside a Quick Action
If you batch-rename frequently with the same pattern, you can save it as a Quick Action via Automator:
- Open Automator → New Document → Quick Action
- Set “Workflow receives current” to “files or folders” in Finder
- Drag the “Rename Finder Items” action into the workflow
- Configure the rename pattern (same options as the Finder dialog, plus more)
- Save with a name like “Add Date Prefix”
Now in Finder, right-click selected files → Quick Actions → “Add Date Prefix” runs your saved rename pattern instantly. No dialog needed.
This is great for patterns you reuse weekly — invoice naming, screenshot tagging, photo dump organizing.
When Finder’s rename isn’t enough
For these cases, you need Terminal or a third-party tool:
- Pattern matching with regex: Finder’s Replace Text is literal-only, no regex
- Conditional renaming: “rename if filename matches X, ignore if not” — Finder treats all selected files the same
- Reading EXIF metadata to rename: “use the photo’s date taken as the filename” — needs a tool like Photo Mechanic or ExifTool
For one-off complex renames, Terminal can handle it. A bash loop:
cd ~/Pictures/Vacation
i=1
for file in *.jpg; do
mv "$file" $(printf "Vacation_%03d.jpg" $i)
i=$((i+1))
done
That renames every JPG in the folder to Vacation_001.jpg, Vacation_002.jpg, etc. The %03d is the padding format — change to %05d for 5-digit padding.
For regex-based renames, the rename command (install via Homebrew with brew install rename) handles patterns. But for most batch renames, Finder’s built-in tool is faster than dropping to Terminal.
Undo a batch rename
Cmd+Z works for several minutes after a batch rename. So if you mess up — pattern was wrong, you renamed the wrong files — undo right away.
If you’ve moved on and noticed the issue later, you can sometimes recover original names from Time Machine if you have backups. But within a few seconds, just Cmd+Z.
Batch rename in practice
Real-world patterns where this saves serious time:
- Photo dumps from a camera: rename
IMG_XXXXto a meaningful trip or event name - Screenshots before sharing: add a project prefix
- Invoices and PDFs: add date prefixes for chronological sort
- Music files from random sources: standardize naming before importing
- Project handoff: rename client deliverables with project codes
Each of these is a 2-minute job with batch rename. Manual would be 20+ minutes plus mistakes.
The Finder batch rename tool isn’t flashy and Apple barely advertises it, but it covers 90% of bulk renaming jobs without needing a dedicated app. Combine Replace Text for cleanup and Format mode for sequential numbering and you can rename hundreds of files in seconds. Run it on every photo folder, every screenshot batch, and every messy Downloads folder, and your file system gets quietly more readable every week.