Back to Blog
·5 min read

Batch rename files on Mac without third-party apps

Every way to batch rename files on a Mac — Finder's built-in renamer, tested Terminal one-liners for sequential numbering and recursion, and when each one wins. No installs needed.

Batch rename files on Mac without third-party apps

Here's the thing most people get wrong: you don't need a renaming app, AppleScript, or Automator to batch rename files on Mac. The Finder has had a built-in batch renamer since OS X Yosemite, and it covers the three operations you actually reach for — find-and-replace, prefix/suffix, and sequential numbering. No install, no subscription, no opening a single file.

This guide goes from the zero-effort Finder route to tested Terminal one-liners for when you want real control. (Updated September 2026 — every Terminal recipe below was re-run and verified.)

Pick your method in ten seconds:

You want to…UseUndo?
Replace IMG_ with something readableFinder → Replace Text⌘Z
Add a project name or date to every fileFinder → Add Text⌘Z
Renumber a folder as Name 001, Name 002Finder → Format⌘Z
Rename across subfolders (recursive)Terminal find / zmvNo — dry-run first
Regex, conditionals, repeatable scriptsTerminalNo — dry-run first

The fast path: Finder's built-in renamer

Select the files you want to rename, Control-click (or right-click) the selection, then choose Rename. If you selected more than one item, Finder swaps the menu wording to Rename [N] Items… and opens a small dialog with a single dropdown. That dropdown is the whole tool — three modes:

ModeWhat it doesUse it for
Replace TextFinds a string in every name, swaps it for anotherKilling junk like IMG_ or fixing a typo across a folder
Add TextPrepends or appends a fixed stringTagging files with a project name or date
FormatRebuilds names with a custom base + a counter, index, or dateTurning a mess into Vacation 1, Vacation 2, …

A few details that save you grief:

  • Select first. The Rename option only does a batch when multiple items are selected. One item gives you a plain inline rename instead.
  • It works on files, folders, and disks. Same dialog, same rules — though renaming a disk is a one-at-a-time inline edit, not part of the batch flow.
  • Extensions stay put. Finder renames the name portion; it doesn't strip or rewrite .jpg/.pdf on you.

Replace Text — strip or fix a common string

Pick Replace Text, type the text to find, type the replacement (leave it blank to just delete the string), and hit Rename. DSC_0142.jpgBeach-0142.jpg by replacing DSC_ with Beach-. This is the one you'll use most: it's how you clean camera dumps, screenshot batches, and export folders in one shot.

Add Text — prefix or suffix everything

Pick Add Text, type your string, and choose before name or after name from the dropdown. Before-name is a prefix (2026-Q2 Report.pdf); after-name lands before the extension, so it reads as a real suffix and doesn't break the file type.

Format — rename files sequentially

Pick Format when the existing names are hopeless and you just want a clean sequence. You set a Name Format (Name and Index, Name and Counter, or Name and Date), a Custom Format base string, and where to start numbering. Result: Invoice 001, Invoice 002, and so on.

Two things control the outcome:

  • Sort order = numbering order. Finder numbers files in the order the window shows them, so sort by date, name, or kind before you open the dialog.
  • Index vs Counter. Index appends 1, 2, 3…; Counter pads to five digits (00001). If you want three-digit padding exactly, the Terminal loop below gives you printf-level control.

> Changed your mind? Press Command-Z right after — Finder undoes the whole batch as one step.

The power path: Terminal

The Finder dialog is great until you need conditional logic, recursion, or pattern matching it can't express. Then drop into Terminal. mv has no undo, so every recipe here follows the same ritual: prefix the command with echo first, read what would happen, then remove the echo and run it for real.

Rename by substitution across a folder (zsh, the default Mac shell since Catalina):

# Replace "IMG_" with "Trip-" in every .jpg in the current folder
autoload -U zmv
zmv -n 'IMG_(*).jpg' 'Trip-$1.jpg'   # -n = dry run; drop it to execute

Sequential numbering with exact padding (shot-001.jpg, shot-002.jpg, …):

i=1
for f in IMG_*.jpg; do
  mv -n -- "$f" "$(printf 'shot-%03d.jpg' "$i")"
  ((i++))
done

Strip the spaces macOS screenshots ship with (Screenshot 2026-09-01 at 10.15.32.pngScreenshot-2026-09-01-at-10.15.32.png):

for f in Screenshot*.png; do mv -n -- "$f" "${f// /-}"; done

Prefix today's date onto every PDF in a folder:

for f in *.pdf; do mv -n -- "$f" "$(date +%F)-$f"; done

Recurse into subfolders — the thing Finder's dialog can't do at all:

# Preview every match first…
find . -name 'IMG_*.jpg' -print
# …then rename in place, one directory at a time
find . -name 'IMG_*.jpg' -execdir zsh -c 'mv -n -- "$1" "${1/IMG_/Trip-}"' _ {} \;

About that -n flag: it's your collision safety net. If the target name already exists, mv -n skips the file instead of silently overwriting it — we verified this while updating the guide: the source file stays untouched and nothing is lost. The trade-off is that skips can be quiet, so after a big batch, count the files (ls | wc -l) and make sure the number matches what you expected.

Looking for "Bulk Rename Utility" on a Mac?

If you're coming from Windows, there's no direct Bulk Rename Utility port — and for most jobs you don't need one. Finder's three modes cover the common 90%, and the Terminal recipes above cover regex-grade renames without installing anything. Third-party Mac renamers earn their keep only for visual regex preview and saved multi-step pipelines; try the built-ins first and see if you still miss anything.

Which one should you use?

  • One folder, a clear find/replace or a clean renumber → Finder. It's faster than typing a command and gives you Command-Z.
  • Recursion into subfolders, regex, or scripting it for later → Terminal. Worth the extra caution for anything you'll repeat.

FAQ

How do I batch rename files on a Mac without downloading anything? Select the files in Finder, right-click, choose Rename [N] Items…, and pick Replace Text, Add Text, or Format. It ships with every macOS since Yosemite (2014).

How do I rename files sequentially (file 1, file 2, …)? Finder → Format → "Name and Index" renumbers in the window's current sort order. For zero-padded numbers like 001, use the printf Terminal loop above.

Can Finder rename files in subfolders too? No — the Rename dialog only touches what you selected in one window. Recursion needs Terminal (find or zmv), or select-all inside each subfolder.

Is there an undo for batch renaming? Finder: yes, ⌘Z reverses the whole batch as one step. Terminal: no — that's why every recipe here has a dry-run form (echo mv … or zmv -n).

Why did some files not get renamed in Terminal? Almost always a name collision: mv -n skips a rename when the target already exists rather than overwrite it. Re-run the dry run and look for duplicate targets.

If you came here mid-cleanup, you're probably also wrangling formats and exports — the same batch instinct applies to resizing images from the Terminal with sips, converting HEIC to JPG in bulk, and combining screenshots into a single PDF.

Sources

#batch#rename#files#mac#terminal

Written by

Peter Zhang

Building local-first Mac & iOS productivity apps at Obelisk Club.