Skip to main content
Folders

How to batch rename files on a Mac

Renaming files one by one is how a Saturday disappears. Your Mac can rename a whole folder in one go, and the tool is already in Finder. Some files, like a camera's IMG_4512, have no pattern for Finder to work with.

Written by SupaDupa Published Updated

Batch renaming files on a Mac is built into Finder: select multiple files, Control-click, choose Rename, and you can replace text, add text, or give the whole set one name format with numbers or dates. It handles most jobs in under a minute. What it can’t do is invent a good name for a file whose current name says nothing.

So we’ll go in order: Finder’s three rename modes, two Terminal loops for what Finder can’t do (one of them adds the date each photo was taken), five rename apps and their prices, and what to do when the names need to come from what’s inside the files.

How to batch rename files in Finder

  1. Select the files in Finder. Command-A selects everything in the window.
  2. Control-click one of the selected files and choose Rename.
  3. In the pop-up menu below Rename Finder Items, choose one of three modes.
  4. Check the example name at the bottom of the window, then click Rename. The change applies to all the selected files at once.

It’s the fastest way to rename multiple files on a Mac, and it handles a folder of thousands of files in one pass the same way it handles ten.

Each mode does one job:

ModeWhat it doesUse it when
Replace TextFinds text in every file name and swaps it for something elseIMG_ should say Lake trip in all 300 names
Add TextAdds the same text before or after every current nameEvery scan needs 2025 Taxes - in front
FormatGives every file one new name plus an index, counter, or dateA folder of camera files should become Wedding 001 to Wedding 240

A few things make it go smoothly:

  • Sort first. In Format mode, Finder numbers the files in the order the window shows them. Sort by date created before you rename, and the numbers follow the order the photos were taken.
  • Read the example. The bottom of the window shows what the first file will be called before you commit.
  • Undo straight away or not at all. Edit > Undo reverses a rename right after you do it. Finder keeps no rename history to go back to later.

What not to rename

Apple is specific about this. Don’t rename app folders or anything that came with the system, like the Library folder, and leave your home folder’s name alone. Don’t change file extensions either, the .jpg or .pdf at the end, or the file may stop opening in the app that made it. Finder’s Rename keeps extensions as they are, which is one reason to use it over renaming by hand.

Batch rename files in Terminal, with a preview

When the pattern is more than Finder can express, a short loop in Terminal can do it. This one previews first and changes nothing:

cd ~/Pictures/lake-trip
for f in IMG_*.jpg; do echo mv -n "$f" "Lake trip ${f#IMG_}"; done

It prints what it would do, one line per file:

mv -n IMG_0412.jpg Lake trip 0412.jpg
mv -n IMG_0413.jpg Lake trip 0413.jpg

If the list looks right, run it again without the word echo, and the files are renamed. The -n stops it from overwriting a file that already has the new name. Change IMG_*.jpg to match your files and Lake trip to the name you want.

This is the same idea as Finder’s Replace Text, with one difference that matters: you can build the new name from any part of the old one. It still only rearranges what’s already in the file names.

Rename photos by the date they were taken

Finder’s Format mode can add a date, but it’s the date you rename, not the date of the photo. To put the date each photo was taken at the front of its name, read it from Spotlight with mdls:

cd ~/Pictures/lake-trip
for f in IMG_*.jpg; do
  d=$(mdls -raw -name kMDItemContentCreationDate "$f")
  [ "$d" = "(null)" ] && { echo "skip $f: no date"; continue; }
  d=$(date -j -f "%Y-%m-%d %H:%M:%S %z" "$d" "+%Y-%m-%d %H.%M")
  echo mv -n "$f" "$d $f"
done

On a test folder it printed:

mv -n IMG_0412.jpg 2025-03-14 10.30 IMG_0412.jpg
mv -n IMG_0413.jpg 2025-03-14 11.45 IMG_0413.jpg
mv -n IMG_0414.jpg 2025-03-15 09.12 IMG_0414.jpg

Remove echo and run it again to rename. The names now sort in the order the photos were taken, in Finder and anywhere else.

  • Use this date, not the file’s created date. We checked photos copied to a Mac in October 2026. Their created date in Finder said October 2026. The date mdls read was the one the photo was taken, back to 2007.
  • The time comes out in your Mac’s time zone. Spotlight stores the date in UTC, and the date line converts it.
  • The time uses a dot, 10.30, not a colon. Finder doesn’t allow colons in file names.
  • Files Spotlight hasn’t indexed are skipped. If a whole external drive comes back with “no date”, Spotlight indexing may be off for it.

Which batch rename app to use

When Finder and Terminal aren’t enough, here are five rename apps for the Mac, from free to subscription. We checked the prices on each developer’s own page or the Mac App Store on November 11, 2026.

AppPriceWhat it adds over Finder
NameChangerFree (donations welcome)A preview that updates as you type, regular expressions, date and sequence numbering
Mass Rename$6.99, Mac App StoreSaved rules, rename by date taken or music tags, rename from a spreadsheet. Version 2.2 can name a file from what’s inside it, on macOS 26 with Apple Intelligence
Renamer 7$26Saved workflows, regular expressions, AI help writing rename rules. Needs macOS 15 or later
A Better Finder Rename 12$29.95Rename by photo and music metadata, a Finder Quick Action. In development since 1996
Renamer.aiFree for 25 files a month, then $9.95 a month, billed yearlyNames files from what’s inside them. It’s a subscription service, not a one-time purchase

If your files already have names with something useful in them, NameChanger is free and covers find-and-replace, regular expressions and numbering. If you rename the same kind of files every week, the paid apps let you set the rule up once and reuse it.

When the names need to come from what’s inside the files

Every tool above rewrites the name a file already has. That works when the name holds something useful. It doesn’t work for IMG_4412.jpg, Scan 12.pdf, or a folder called DCIM_0042, because there’s nothing in those names to rearrange. The information you want in the name, what the photo shows or what the document is, lives inside the file.

On Macs with Apple Intelligence, Finder can suggest a name when you create or rename a single document: turn on Suggest File Names in Finder > Settings. Apple notes it isn’t available in every language or region, and it works one document at a time.

For whole folders, you need a tool that reads what’s inside each file, proposes names, and shows you all of them before anything changes. Mass Rename and Renamer.ai, in the table above, both do this now. SupaDupa does it as part of tidying a whole folder.

Using SupaDupa to rename from what’s inside

Point SupaDupa at a folder and open Tidy. It reads the files and proposes names, then puts the whole list in front of you.

  • Screenshots get named from the text in them, instead of Screenshot 2026-07-25 at 03.07.36.
  • Folders get a real name from what’s inside, like “Mount Vernon Wedding Reception” for a folder called DCIM_0042. That one is a Pro feature, needs an Apple Silicon Mac with 8 GB of memory, and your files stay on your Mac while it works.
  • Nothing is renamed until you approve it. You see every proposed name, keep the ones you like, and skip the rest.
  • Renames can be undone from the app, later, not only right after.
  • Your home folders keep their names. Desktop, Documents, Downloads and the rest are never offered for renaming.

The Tidy plan is free on every folder. Pro makes the moves. It’s $49 once, with a year of updates included.

Before you rename a lot of files

  • Try it on a copy first. Duplicate a folder, rename the copy, and check that everything still opens.
  • Watch for apps that track files by name. Photo editors and music apps sometimes lose track of files renamed outside them. Rename inside those apps when they offer it.
  • Leave extensions alone. The .jpg stays .jpg.
  • Date first sorts best. If you’re choosing a format, 2025-03-14 Lease renewal sorts in time order everywhere. How to organize files on a Mac has more on naming that holds up.

Common questions

How do I rename multiple files at once on a Mac?
To rename multiple files at once on a Mac, select them in Finder, Control-click one of them, and choose Rename. The Rename Finder Items window lets you replace text in every file name, add text before or after the current names, or switch them all to one name format with a number or date. Click Rename to apply it to every selected file.
How do I batch rename files on a Mac with numbers?
To batch rename files on a Mac with numbers, select the files, Control-click one, choose Rename, then pick Format from the pop-up menu. Choose Name and Index or Name and Counter, type the new name in the Custom Format field, and set the number to start from. Finder numbers the files in the order they're sorted in the window.
Can I undo a batch rename on a Mac?
A batch rename in Finder can be undone straight after you do it with Edit > Undo, or Command-Z. Finder doesn't keep a rename history to go back to later, so check the example name in the Rename window before you click Rename.
Is it possible to automate file renaming on a Mac?
File renaming on a Mac can be automated with a Terminal loop for repeatable patterns, or with an app that renames files by rules or by what's inside them. Finder's built-in Rename is manual but handles most one-off batches. For files whose names say nothing, like IMG_4412.jpg, only a tool that reads the contents can suggest a meaningful name.
What should I never rename on a Mac?
Apple advises against renaming app folders, items that came with the system such as the Library folder, your home folder, and file extensions like .jpg or .pdf. Changing an extension can stop a file from opening in the app that made it. If renaming something causes a problem, change the name back.
What is the best batch file renamer for Mac?
The best batch file renamer for Mac depends on what the names need to say. Finder's built-in Rename handles find-and-replace, adding text and numbering for free. NameChanger is free and adds regular expressions and a live preview. A Better Finder Rename ($29.95), Renamer 7 ($26) and Mass Rename ($6.99 on the Mac App Store) add saved rules and metadata like the date a photo was taken. When the current names carry no information at all, a tool that reads what's inside each file is the only kind that can suggest a name.
How do I rename photos by the date they were taken on a Mac?
Finder can't rename photos by the date they were taken. In Terminal, the mdls command reads the date Spotlight stored for each photo, and a short loop can put it at the front of each name, previewing the changes first. Apps such as A Better Finder Rename and Mass Rename can also rename by date taken. Use the date taken, not the file's created date, which is often the day the photo was copied to your Mac.
How do I rename a single file on a Mac?
To rename a single file on a Mac, select it in Finder and press Return, type the new name, and press Return again. A file name can't contain a colon or start with a period, and some apps won't accept a slash.
Does renaming a file change what's inside it?
Renaming a file on a Mac changes only its name. The contents stay exactly as they were, as long as you leave the extension at the end, such as .jpg or .pdf, unchanged. Apps that track files by name, like some photo and music apps, may need to find a renamed file again.
Can Finder suggest file names on a Mac?
On Macs with Apple Intelligence, Finder can suggest file names when you create or rename a document. Turn it on in Finder > Settings with Suggest File Names. Apple notes it isn't available in every language or region, and it names one document at a time.

Keep reading

Folders

How to organize files on a Mac

Organize files on a Mac with a folder structure that survives a busy week, file names you can search, and built-in tools that sort for you.

Duplicates

How to find duplicate videos on a Mac

Find duplicate videos on a Mac with the Photos app, Finder and a free Terminal command, plus what to expect from any duplicate video finder you try.