When you want to rename photos or documents in bulk, Mac includes powerful batch file renaming features by default. There are three main approaches: Finder's built-in Rename Items feature, Automator Quick Actions, and Terminal using commands such as mv or rename. Choosing the right one for your task and file count makes the work much more efficient.
I usually start with Finder even when I know the Terminal command, because Finder's preview catches obvious mistakes before files are changed. Terminal is better only after the rule is clear and I have copied the files to a test folder. This article explains every method with practical examples, targeting recent macOS versions including Sonoma and Sequoia. For broader Mac tips, also see Mac Troubleshooting Guide.
Table of Contents
- Quick Answer: Which Mac Batch Rename Method Should You Use?
- Before You Rename: Safety Checklist
- Three Ways to Batch Rename Files on Mac
- Finder's Batch Rename Feature
- Finder Format Options in Detail
- Create a Batch Rename Workflow with Automator
- Use the mv Command in Terminal
- The rename Command via Homebrew
- Practical Photo File Renaming Examples
- Practical Document File Renaming Examples
- Troubleshooting
- Related Mac File-Management Guides
- Summary: The Best Choice by Use Case
Quick Answer: Which Mac Batch Rename Method Should You Use?
Use this as the shortest decision guide:
- Just replace "IMG_" with "Trip_" or add a date prefix: use Finder's built-in Rename Items
- Add clean sequential numbers to 10 to 200 files: use Finder's Format mode
- Run the same rename pattern every week: create an Automator Quick Action
- Rename more than 1,000 files or use regular expressions: use Terminal with rename
- Rename photos by actual capture date: use exiftool
- Work on important originals: copy the files first, then rename the copy
For most people, Finder is the correct first answer. It supports Apple's official three modes: replacing text, adding text, and changing the name format. Automator and Terminal are excellent, but they are easier to misuse because they can run the same rule across many files very quickly.
Before You Rename: Safety Checklist
Batch renaming is deceptively risky because the first mistake is multiplied across every selected file. Before touching important files, I recommend this order:
- Create a temporary folder and copy a few sample files into it
- Test the rename rule on the copies
- Turn on visible filename extensions in Finder if extensions matter
- Sort the folder in the order you want before adding sequential numbers
- Use Finder preview or rename -n before committing
- Keep a Time Machine backup or another copy for important documents
This is especially important for client PDFs, exported photos, scanned receipts, and files synced through cloud storage. If files are inside iCloud Drive, Dropbox, Google Drive, or OneDrive, a bad rename can sync to every device before you notice. For general backup and migration planning, see Mac Data Migration Complete Guide and Mac Data Recovery Guide.
Three Ways to Batch Rename Files on Mac
There are three main ways to batch rename files on Mac, and each is best suited to different tasks.
Finder's Built-in Feature: Complete Everything in the GUI
Built into macOS since OS X Yosemite. For basic operations on around 10 to 100 files, such as replacing text, adding text, or adding sequential numbers, this is all you need. No installation required, with the smallest learning curve. It is the first choice for everyday use.
Automator: Automate Repetitive Tasks
If you register the workflow as a Quick Action, you can call it directly from Finder's right-click menu. It makes routine work much easier when you repeat the same operation every week.
Terminal: Maximum Flexibility for Advanced Users
By combining the mv command or the rename command, you get the ultimate flexibility to do almost anything with regular expressions. Terminal is the best option for processing more than 1,000 files or for complex tasks such as naming files based on Exif information.
Finder's Batch Rename Feature
For batch renaming on Mac, Finder's built-in feature covers most needs. It has been available since Yosemite (10.10), and its behavior has remained stable across major macOS updates.
Select Multiple Files and Open Rename
Select the target files in Finder (⌘ + A to select all, Shift-click to select a range, or ⌘-click to select individual files) → right-click the selected files → choose "Rename Items...". You can also open the same dialog from the menu bar: "File" → "Rename".
If you do not see "Rename Items...", check the selection count first. With only one file selected, Finder shows the normal single-item rename behavior instead of the batch dialog. I also recommend switching Finder to List view and sorting by name, date, or kind before running a numbered rename, because the sequence follows the order of the selected items.
"Replace Text" Mode
From the dropdown at the top of the dialog, choose "Replace Text". Enter the text to find and the replacement text → check the preview → click the "Rename" button to run the bulk replacement. For example, replacing "IMG_" with "Photo_" changes "IMG_1234.JPG" to "Photo_1234.JPG".
This is the safest mode for small corrections such as removing "Screen Shot" from screenshot names or replacing spaces with hyphens. It is less suitable when each file needs a unique number, because it does not create counters.
"Add Text" Mode
Choose "Add Text", enter the text you want to add in the "Text" field, then choose where to place it ("before name" or "after name"). For example, adding "2026-05_" before the name changes "IMG_1234.JPG" to "2026-05_IMG_1234.JPG". This is useful when adding a project name or date prefix in bulk.
Use "Format" Mode to Add Sequential Numbers
"Format" is the most powerful mode because it rewrites file names using a completely new naming rule. Set the naming pattern in "Name Format", the fixed text in "Custom Format", and the starting value in "Start numbers at". For example, if you set the custom format to "Vacation", the starting number to "1", and the name format to "Name and Number", the files will be named "Vacation 1.jpg", "Vacation 2.jpg", and so on.
Before clicking Rename, look at the preview line carefully. Finder shows the before-and-after result, and that preview is the main reason I prefer Finder for ordinary photo and document cleanup.
Finder Format Options in Detail
"Format" mode has many options, and combining them gives you flexible naming patterns.
Name and Number, Name and Counter, Name and Date
You can choose from three format types in the dropdown:
- Name and Number: "Vacation 1.jpg", "Vacation 2.jpg" (separated by a half-width space)
- Name and Counter: "Vacation00001.jpg", "Vacation00002.jpg" (fixed five-digit zero padding)
- Name and Date: "Vacation 2026-05-01 14-23-15.jpg" (timestamp from when the rename is run)
For sequential photo names, "Name and Counter" is often preferred because it keeps the digit width consistent.
Starting Number and Number of Digits
You can set the initial value in "Start numbers at". If you enter "100", the files continue as "Vacation 100.jpg", "Vacation 101.jpg", and so on. In "Name and Counter" mode, the zero-padded width is fixed at five digits, while "Name and Number" uses variable digits, so names like "9.jpg" and "10.jpg" coexist. Since some file managers sort "10" before "9", choose "Counter" if aligned digit widths matter.
Whether to Place the Number Before or After the Name
In "Where", you can choose "before name" or "after name". "After name" is common, as in "Vacation 1.jpg", but choosing "before name" sorts the folder by number, so use whichever fits the purpose.
Create a Batch Rename Workflow with Automator
If you routinely rename files with the same pattern every week, registering the task as an Automator "Quick Action" lets you run it in one step.
Steps to Register It as a Quick Action
Launch "Automator.app" → choose "Quick Action" → search for "Rename Finder Items" in the search bar, then drag it into the workflow area. Configure options such as "Replace Text", "Add Text", or "Make Sequential" → choose "File" → "Save", give the Quick Action a name, and save it.
Automator may offer to add a "Copy Finder Items" action before renaming. For important files, accept that suggestion while testing. It creates a copy first, so a bad rule does not damage the original set.
Add It to Finder's Right-click Menu
After saving it, select multiple files in Finder → right-click → "Quick Actions" → the action name you created to run it. You can also assign a keyboard shortcut from "Settings" → "Keyboard" → "Keyboard Shortcuts" → "Services", which makes the operation even faster.
Branch by Condition to Process Only Certain Extensions
Place a "Filter Finder Items" action at the beginning and specify a condition such as "extension is jpg". Then, even if the selection includes other extensions, only the target files will be processed. This makes workflows like "rename only the jpg files in the photo folder and leave PDFs untouched" possible.
Use the mv Command in Terminal
For complex renaming that the GUI cannot handle, Terminal is the strongest option. It gives you full control over processing 1,000 or more files, automatic naming based on Exif data, regular-expression replacements, and more.
Basic One-off Renaming with mv
mv old_name.txt new_name.txt
This is the most basic rename operation. It is not a batch operation by itself, but you can turn it into one with shell variables and loops. If the file name contains spaces, you need to wrap it in quotes:
mv "old name.txt" "new name.txt"
Sequential Renaming with a for Loop
i=1
for f in *.jpg; do
mv "$f" "Vacation_$(printf '%03d' "$i").jpg"
i=$((i + 1))
done
This script renames every jpg in the current directory to "Vacation_001.jpg", "Vacation_002.jpg", and so on. printf '%03d' applies three-digit zero padding, and the numbers are assigned in the shell's sort order for *.jpg.
Run this only inside the folder you intend to process. If you are not sure, type pwd first to confirm the current folder and ls *.jpg to preview which files will match.
zsh / bash Expansion Syntax
zsh, the macOS default shell, has convenient syntax using brace expansion and parameter expansion:
# Change only the extension: .jpeg -> .jpg
for f in *.jpeg; do
mv "$f" "${f%.jpeg}.jpg"
done
# Add a prefix
for f in *.jpg; do
mv "$f" "2026-05_$f"
done
${f%.jpeg} is parameter expansion that removes the trailing .jpeg.
The rename Command via Homebrew
If you want to rename files easily in Terminal with regular expressions, installing the rename command with Homebrew is the standard choice.
Install with brew install rename
brew install rename
If Homebrew itself is not installed, follow the setup instructions on the official site. rename is a utility that can rewrite file names in bulk using Perl regular expressions.
Flexible Renaming with Regular Expressions
# Replace the IMG_ prefix with Photo_
rename 's/^IMG_/Photo_/' *.jpg
# Pad numbers to three digits
rename 's/(\d+)/sprintf("%03d",$1)/e' *.jpg
# Change the extension from .jpeg to .jpg
rename 's/\.jpeg$/\.jpg/' *
s/old/new/ is Perl replacement syntax. With the /e flag, the right-hand side can be evaluated as a Perl expression, enabling flexible processing such as digit-width adjustment.
Preview with the -n Option
rename -n 's/IMG_/Photo_/' *.jpg
Adding -n or --no-act previews only the changes without actually renaming the files. Getting into the habit of checking whether the conversion is what you intended before running it for real reduces mistakes.
Practical Photo File Renaming Examples
Here are practical examples for standardizing names around capture dates.
Change "IMG_1234.JPG" to "2026-05-01-001.jpg"
In Finder's "Format" mode:
- Custom Format: "2026-05-01-"
- Name Format: "Name and Counter"
- Start numbers at: "1"
This names the selected files in order as "2026-05-01-00001.jpg". The key is to pay attention to selection order, or sort by name in Finder before selecting the files.
If you want exactly three digits, such as "2026-05-01-001.jpg", Finder's fixed "Name and Counter" format may be too wide. In that case, either accept the five-digit counter or use the Terminal loop above with printf '%03d'. For shared folders and long-term archives, consistent sorting matters more than having the shortest possible number.
Automatically Name Files from Exif Capture Date
Finder cannot do this, so use exiftool in Terminal:
brew install exiftool
exiftool '-FileName<DateTimeOriginal' -d '%Y-%m-%d-%H%M%S.%%e' *.jpg
This command reads the Exif capture date from each photo and renames the file using that date and time. Even photos from the same event will sort by capture time, so the chronology stays intact.
How to Organize Photos Synced Between iPhone and Mac
Photos imported from iPhone use the "IMG_" prefix plus sequential numbers. For photos synced with iCloud, file names inside Photos.app cannot be changed, so organization after export is the main workflow. The standard approach is to export them from "Photos.app" → "File" → "Export" → "Export Unmodified Original", then rename them using the steps in this article.
If your goal is only to change screenshot names rather than all photo files, see How to Customize Mac Screenshots. Screenshot filenames can be adjusted at the system level, which is cleaner than renaming every screenshot afterward.
Practical Document File Renaming Examples
Organizing business documents is a typical case where naming rules determine how useful the system becomes.
Standardize Invoice PDFs as "YYYY-MM-Client.pdf"
In an invoice folder, a realistic hybrid workflow is to select everything → "Rename Items" → "Add Text" → add "2026-05_" before the name → manually append each client name. If you want full automation, OCR is required, which means using a third-party app such as PDFExpert or PDF Architect, or building the flow with Apple Shortcuts.
For a small business folder, I would keep the format predictable rather than clever: 2026-05_Client_Service.pdf is easier to scan than a long sentence-style file name. If you also merge or split PDFs as part of the same workflow, How to Merge PDF Files on Mac is the natural companion guide.
Add Track Numbers to Music Files
In "Format" mode, choose custom format "Track", starting number "01", and name format "Name and Counter". If you want to respect MP3 tags, it is more accurate to open and edit the files in Music.app, formerly iTunes. File-name renaming is best limited to surface-level organization.
Avoid Number Collisions with Duplicate File Names
When you gather files from multiple folders into one folder, duplicate names can cause overwrites. In Finder, choosing "Keep Both" while copying automatically adds numbers such as "Untitled 2.jpg" and "Untitled 3.jpg", but the naming is not especially clean. To renumber everything in bulk, it is safest to rebuild all names together using Finder's "Format" option.
Troubleshooting
Here are common points where rename workflows go wrong and how to avoid them.
You Cannot Restore the Original Names After Renaming
Finder batch renaming can be undone with ⌘ + Z (Undo) for the immediately previous operation, but files renamed with mv in Terminal cannot be restored that way. Before processing important files, take a Time Machine backup or copy the files to another folder first. Using the rename -n dry run is also recommended.
Only the Extension Disappears
If you use Finder's "Replace Text" with a replacement that includes ".jpg", you may accidentally remove the extension. Finder is designed to rename files including their extensions, so check the replacement target explicitly. Turning on "Settings" → "Finder" → "Advanced" → "Show all filename extensions" lets you see extension states before and after renaming, which reduces mistakes.
Finder's Rename Menu Does Not Appear
If "Rename Items..." does not appear when multiple files should be selected, only one item may actually be selected. Use Shift-click or ⌘-click to ensure multiple selection before right-clicking. If you select only folders, some menus may change, so when files and folders are mixed, it is safer to process them separately.
Files Disappear from the Expected Folder After Renaming
Renaming itself does not move files, but cloud sync and sorting can make it look that way. After a batch rename, Finder may re-sort the folder automatically, so the renamed files can jump to a different position in the list. If you are working in iCloud Drive or another synced folder, wait for sync to finish before renaming again.
If files are truly missing, stop making changes and check Trash, Time Machine, and cloud version history before running another batch operation. For recovery steps, see Mac Data Recovery Guide.
Related Mac File-Management Guides
Batch renaming often sits inside a larger file-cleanup workflow. These related guides are useful next steps:
- Need to merge renamed PDFs: How to Merge PDF Files on Mac
- Need to change screenshot filename behavior: How to Customize Mac Screenshots
- Need to reveal dotfiles or hidden folders before renaming: How to Show Hidden Files on Mac
- Need to recover files after a mistake: Mac Data Recovery Guide
- Need more general Mac fixes: Mac Troubleshooting Guide
Summary: The Best Choice by Use Case
There are three ways to batch rename files on Mac. Choose based on file count and purpose:
| File count / use case | Recommended option |
|---|---|
| 10 to 100 files, text replacement or sequential numbering | Finder's built-in Rename Items |
| Repeating the same process every week | Automator Quick Action |
| 1,000 or more files, complex regular expressions | Terminal + rename |
| Automatic naming from Exif information | exiftool |
| Standardizing by capture time order | exiftool + keep filename extensions |
For everyday use, Finder is enough. If you want a repeatable workflow, use Automator. For more serious file operations, move on to Terminal step by step. Always test the rule on copies first, especially when the files are synced through cloud storage. For broader Mac operations, also see Mac Troubleshooting Guide.


