How to rename multiple files at once on a Mac
Finder has had a batch rename tool for years, and it handles most jobs without any extra software: replacing a word in every name, adding a date, or numbering a set of photos in order.
Open the rename tool
- Select the files. Click the first, then hold ⇧ and click the last, or hold ⌘ to pick individual files.
- Right-click the selection and choose Rename….
- Pick one of three modes from the pop-up menu at the top.
Replace Text
Swaps one piece of text for another in every name. Type what to find and what to replace it with.
Example: find IMG_, replace with Goa-. IMG_4410.jpg becomes Goa-4410.jpg. Leave the replacement empty to delete the text.
Add Text
Adds the same text before or after every name.
Example: add 2026-11 before the name, and invoice.pdf becomes 2026-11 invoice.pdf.
Format
Throws away the old names and builds new ones.
- Name and Index:
Trip 1,Trip 2,Trip 3. - Name and Counter:
Trip 00001,Trip 00002, which keeps files in order when sorted by name. - Name and Date: the name followed by today's date and time.
Type the base name in Custom Format and choose where the number starts.
Get the order right first
Format numbers the files in the order they are shown in the Finder window. Before selecting, sort the window by Date Created or by name, so the numbering follows the order you want.
Undo
Press ⌘Z straight after a rename and every file goes back to its old name.
Change extensions in Terminal
Finder's tool leaves extensions alone. To change .jpeg to .jpg for every file in the current folder:
for f in *.jpeg; do mv "$f" "${f%.jpeg}.jpg"; done
Finding the files to rename
Batch rename works on files you can select together, which means getting them into one Finder window. If they are scattered, search first: press ⌘F, find them, select them in the results and rename from there.
Gander does not rename files. It helps with the step before: finding every screenshot from one month, or every PDF from one sender, and showing them in Finder with one command so you can rename them as a batch.
FAQ
Can I rename files with a number sequence on a Mac?
Yes. Select them, choose Rename, set the mode to Format and pick Name and Index or Name and Counter.
Does batch renaming change the file extension?
No. Finder keeps each file's extension as it is.
Can I undo a batch rename later?
Only straight away with Command-Z. Once you have done other things in Finder, the rename can no longer be undone automatically.