MainspringGuides › Batch rename files on Mac
macOS Guide

Batch rename files on Mac — the built-in Finder tool

Updated 2026 · 5 min read

Most Mac users don't know Finder has a batch rename tool built in. It's been there since OS X Yosemite, it handles hundreds of files at once, and it covers the three most common rename jobs: swapping text, adding a prefix or suffix, and applying a sequential format. No third-party app required.

How to open the batch rename dialog

  1. In Finder, navigate to the folder containing the files you want to rename.
  2. Select them: press ⌘A to select all, or click the first file and then ⇧-click the last to select a range. To pick non-adjacent files, hold while clicking.
  3. Right-click (or Control+click) any of the selected files.
  4. Choose Rename [X] Items… from the context menu — the number reflects how many files you selected.

A small dialog appears with a dropdown to choose the rename mode. There are three.

Mode 1: Replace text

This works like find-and-replace in a text editor, but for filenames. Enter the text you want to find in Find: and the replacement in Replace With:.

Example: you have fifty files named IMG_20240312_001.jpg and you want to replace IMG_ with Holiday_. Type IMG_ in Find and Holiday_ in Replace With, and every filename gets updated instantly.

The match is case-sensitive. If nothing in your filenames matches, nothing happens — no error, no partial rename.

Mode 2: Add text

Adds a fixed string to the beginning or end of every selected filename. Two options:

Example: select a folder of client screenshots and add ClientX_ before the name. They become ClientX_screenshot1.png, ClientX_screenshot2.png, and so on. The extension is preserved.

Mode 3: Format

This is the most powerful mode — it replaces the entire filename (minus extension) with a new base name plus a counter or date. The dropdown gives you three sub-options:

You set the custom format name in the Custom Format field and the starting number in Start numbers at:. Great for photos from a trip — set the base name to Lisbon_2024 and index from 1, and you get Lisbon_2024 1.jpg, Lisbon_2024 2.jpg, etc.

Undoing a batch rename

If the result isn't what you expected, press ⌘Z immediately. macOS treats the entire batch rename as a single undo action — all files revert to their original names at once. This works even for hundreds of files, as long as you haven't done anything else in Finder since.

What Finder's batch rename can't do

The built-in tool covers most everyday jobs, but it has real limits:

When to use Terminal instead

For anything beyond simple replacements, a shell loop in Terminal does the job. Here's a quick example: rename every .jpeg in a folder to .jpg:

# rename all .jpeg files to .jpg in the current folder
for f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done

And here's adding a prefix to every file:

# add "draft_" prefix to all .docx files
for f in *.docx; do mv "$f" "draft_$f"; done

For regex-powered renames, install the rename utility via Homebrew (brew install rename) — it takes Perl-style patterns and is the fastest tool for complex jobs.

Do it in one click

Mainspring turns dozens of buried macOS settings into one-click, reversible toggles — so your Finder environment is always set up the way you want before you start renaming, sorting, or organising. Every tweak is labelled and undoable.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once