Mac2025-01-289 min read

How to Rename Multiple Files at Once on Mac (Batch Rename Guide)

To rename multiple files at once on a Mac, select them in Finder, Control-click one of them, choose Rename, pick Replace Text, Add Text or Format, and click Rename. That built-in batch rename works on every macOS version since OS X Yosemite, including macOS Sequoia 15 and Tahoe 26, and Command-Z undoes it.

For jobs Finder can't do, such as changing case or repeating the same rename every week, build an Automator Quick Action. For pattern changes like swapping extensions or numbering with leading zeros, use a short zsh command in Terminal. All three methods are below, step by step. If you are choosing a dedicated app instead, see our comparison of the best batch file renamers for Mac.

Method 1: Batch Rename Files in Finder

  1. Open the folder in Finder.
  2. Select the files: Command-A for all of them, Command-click for individual files, or Shift-click for a range in list view.
  3. Control-click (or right-click) any selected file and choose Rename. On older macOS versions the menu item says Rename X Items. You can also use File > Rename.
  4. Choose a mode from the pop-up menu at the top left of the rename window.
  5. Fill in the fields, check the example at the bottom of the window, and click Rename.

Replace Text

Find a piece of text in every name and swap it for something else. Leave the Replace field empty to delete the text.

Find:     vacation
Replace:  hawaii
Before:   vacation_photo_001.jpg
After:    hawaii_photo_001.jpg

Add Text

Add the same text before or after each name. The extension stays where it is.

Text:     2026-11-
Where:    before name
Before:   invoice-acme.pdf
After:    2026-11-invoice-acme.pdf

Format

Replace each name with a base name and a number. In Name Format choose Name and Index (1, 2, 3), Name and Counter (zero-padded), or Name and Date. Type the base name in Custom Format, choose whether the number goes after or before the name, and set "Start numbers at". Files are numbered in the window's current sort order, so sort by name or date first. For more numbering patterns, see how to rename files in sequence.

Undo a Finder batch rename

Press Command-Z straight after renaming and every file returns to its old name.

Method 2: Automator Quick Action (Reusable)

Automator's Rename Finder Items action adds options Finder lacks, including Change Case (lower, upper, title) and Add Date or Time. Saved as a Quick Action, it shows up in Finder's right-click menu.

  1. Open Automator from the Applications folder and choose New Document > Quick Action.
  2. At the top of the workflow, set "Workflow receives current" to files or folders and "in" to Finder.
  3. Search the action library for Rename Finder Items and drag it into the workflow.
  4. Automator asks whether to add a Copy Finder Items action first. Click Add to rename copies and keep the originals, or Don't Add to rename the originals.
  5. Choose the mode from the action's first pop-up menu: Add Date or Time, Add Text, Change Case, Make Sequential, Name Single Item or Replace Text, and set its options.
  6. Optional: click Options at the bottom of the action and tick "Show this action when the workflow runs" so you can change the settings every time.
  7. Press Command-S and give it a clear name such as "Rename to lowercase".

To use it, select files in Finder, Control-click, and choose Quick Actions followed by your workflow's name.

The Shortcuts app on macOS also has a Rename File action. Combined with Repeat with Each and set up as a Quick Action, it can do the same job if you already build shortcuts. Test any new shortcut on copies first.

Method 3: Terminal (zsh)

Terminal is the most flexible way to batch rename files on Mac, and macOS uses zsh as its default shell. There is no undo, so work on a copy of the folder or run a dry run first.

  1. Open Terminal (Applications > Utilities).
  2. Type cd (with a space), drag the folder from Finder into the Terminal window, and press Return.
  3. Run a dry run that only prints the commands, check the output, then run the real command.

Add a prefix

# Dry run: prints what would happen
for f in *.jpg; do echo mv -n -- "$f" "hawaii-$f"; done

# Rename for real
for f in *.jpg; do mv -n -- "$f" "hawaii-$f"; done

The -n flag stops mv from overwriting a file that already has the new name.

Replace text in file names

for f in *vacation*; do mv -n -- "$f" "${f//vacation/hawaii}"; done

Replace spaces with hyphens

for f in *' '*; do mv -n -- "$f" "${f// /-}"; done

Number files with leading zeros

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

This gives trip-001.jpg, trip-002.jpg and so on, in alphabetical order of the original names.

Pattern renames with zmv

zsh ships with zmv, a batch rename function that understands patterns. -n shows the result without renaming anything.

autoload -U zmv
zmv -n '(*).jpeg' '$1.jpg'   # preview: change .jpeg to .jpg
zmv '(*).jpeg' '$1.jpg'      # run it

More extension examples are in the bulk file extension guide.

Method 4: Rename Files by Content with AI

Finder, Automator and Terminal can only rearrange text that is already in a name. If your files are called IMG_4521.HEIC or scan0003.pdf, there is nothing useful to rearrange. File Renamer AI runs in Safari or Chrome, reads each photo, PDF or document, and suggests a descriptive name such as sunset-beach-palm-trees.heic. You review and edit the names, then download the renamed files as a ZIP.

Which Method Should You Use?

  • Prefix, suffix, find and replace, or numbering: Finder
  • Same rename every week, or case changes: Automator Quick Action
  • Extensions, zero-padded numbers, hundreds of files: Terminal
  • Generic camera or scanner names: AI renaming
  • Regex and metadata in a GUI: a renamer app, compared in best batch file renamer for Mac

Troubleshooting

  • Rename is missing from the menu: make sure you right-clicked a selected file, not empty space in the window.
  • Some files were skipped: locked files are not renamed. Select them, press Command-I and clear Locked.
  • Extensions changed unexpectedly: turn on Finder > Settings > Advanced > "Show all filename extensions" so you can see the full name before you replace text.
  • "Operation not permitted" in Terminal: grant Terminal access under System Settings > Privacy & Security > Files and Folders or Full Disk Access.

Frequently Asked Questions

How do I rename multiple files at once on a Mac?

Select the files in Finder, Control-click one of them and choose Rename. Pick Replace Text, Add Text or Format, fill in the fields, and click Rename. Every selected file is renamed in one step, and Command-Z undoes it.

How do I batch rename files on Mac with numbers?

In Finder's rename window choose Format, then Name and Index or Name and Counter, type a base name and the starting number. In Terminal, a for loop with printf gives zero-padded numbers such as photo-001.jpg.

Can I change the file extension of many files on a Mac?

Yes. In Terminal, run autoload -U zmv and then zmv '(*).jpeg' '$1.jpg' to change every .jpeg file to .jpg. Renaming the extension does not convert the file format, so only do it when the content already matches the new extension.

Can I undo a batch rename on Mac?

Finder renames can be undone with Command-Z right after you make them. Terminal renames cannot be undone, which is why the examples above start with a dry run.

Is there a keyboard shortcut to rename files on Mac?

Pressing Return renames a single selected file. There is no default keyboard shortcut for the multi-file rename window; use Control-click > Rename or File > Rename in the menu bar.

Ready to organize your files?

Try AI renaming right away. No sign-up needed until you download.

Try It Free