How to batch rename lots of files on Mac at the same time

122.8K views
8 min read

Whether you’re cleaning up a bunch of generic file names or re-organizing your folders, renaming a lot of files at the same time is often a necessity that can save you hours, especially when you’ve planned something grand, like a revamp of your photo library, for example. 

Renaming a single file in macOS isn’t difficult. Just select the file and hit Return to edit its name, or right-click and select Get Info to call up a menu from which the name can be changed. 

But when you’re trying to rename multiple files, things get tricky. Instead of manually selecting each individual file, which would waste an enormous amount of time and in addition be prone to errors and typos, use one of the alternative methods described below.

Let’s start with the most effortless tool for batch renaming.  

How to batch rename files using Renamer

Whether it’s a simple file name update, such as changing a keyword or adding sequential numbers, or something more complex, Renamer will fit your flow. The app has all the tools you need for complete control over batch renaming files. This app allows you to: 

  • Easily add and replace text in any number of files
  • Number files randomly or sequentially
  • Organize file renaming tasks into Renamerlets, using either those already built-in or customizing your own
  • Create chains to handle complex file renaming tasks
  • Insert music track numbers, switch between upper and lower case, add dates and location tags
  • Change or remove file extensions
  • Preview the way files are going to look like before you’ve proceeded with the renaming process. 

Moreover, renaming batch files with Renamer is very easy:

  1. Open the Renamer app
  2. Drag and drop the files you’d like to rename onto the window. If you’d rather find them manually, click on the plus button to search your hard drive.
  3. Use Renamerlet protocols from the left-hand menu for specific rules depending on file types, such as adding geotags to photos
  4. If the formatting you need isn’t already a Renamerlet, you can create your own by pressing the plus button at the very bottom of the left-hand menu and selecting New Renamerlet. Assign it a name and, after pressing OK, you can set up its own particular function.

Rename batch files

If you’re renaming image files regularly, we recommend using Squash. Not only has it a simple batch renaming tool, it can also help you deal with a number of other small tasks, such as compressing, resizing, or adding watermarks to your photos. It’s a universal batch image processor.  

squash mac


How to rename multiple files in Finder

It’s possible to edit multiple file names at the same time using a simple Finder window. Here’s how to do that:

  1. Open Finder on your Mac
  2. Find the files you are looking to rename
  3. Use Shift-click to select a batch of files
  4. Click the three-dots icon at the top of the Finder window
  5. Click Rename 
  6. Select Format (the third option in the Rename toolbar)
  7. Here you need to select a Name Format for your file renaming. You can choose from Name and Index, Name and Counter, and Name and Date.
  8. In the Custom Format box, enter the new name that will be included in all of the selected files
  9. Enter a number in the “Start numbers at” box. It could be 1, but it doesn’t have to be.
  10. Click Rename.  

As a result, all of the selected files will be renamed with the title you entered in the Name Format box plus a sequential number beginning with the digit in the “Start numbers at” field.

rename files in finder

How to add text to a batch of existing file names

Sometimes the file names in question are fine as they are — they just need an extra identifier to be properly distinguished. If you’d like to add text to the file name without deleting the original name, you can do that using Finder as well:

  1. Open Finder on your Mac
  2. Find the files you need to rename
  3. Use Shift-click to select a batch of files
  4. Click the three-dots icon > Rename 
  5. In the dropdown menu, select the second option Add Text
  6. In the Add Text field, enter the word or words you would like to be added to the file name
  7. You can also choose whether the addition will be inserted before or after the existing file name
  8. Select Rename to update the file names with the new text. 

batch add text to files

How to rename an open file

Since documents that are open or currently in use are locked from being edited, they can’t be renamed through the Finder function or by selecting Get Info or hitting Return when the file is selected. It’s a hassle to close down a document you’re working on just to rename the file — but if you don’t, you’re likely to forget by the time you’re done with it.

One quick hack for renaming an open document is to simply save it again with a new name:

  1. Go to File > Save As
  2. Enter a new file name and choose a new location if you’d like to
  3. Click Save.  

The document name has now been changed to its new name, and all new saves will be done there. Remember to delete the old document copy with the original name.

Since you’ll inevitably forget to delete some of the older copies, it’s smart to install CleanMyMac X if you don’t have it yet. Run regular scans and it will automatically delete redundant file copies.  

cmm scanning

How to undo a batch-rename of files on Mac

If you use Renamer, you can undo the latest batch-rename easily: 

  1. Choose Edit in the app’s menu 
  2. Choose ‘Undo Rename Files’

undo batch rename files

The same goes for Finder. If you’ve just recently renamed a batch of files and want to undo that action, go to Edit > Undo Rename (alternatively, press Command + Z). However, since Finder only allows you to undo recent actions, you won’t be able to undo a batch-rename if you ran any other action in Finder after you had renamed files. 

How to replace and search certain words in files on Mac 

It’s easy when you know which files to rename but what if you don’t? If you have a huge pack of photos, for example, and need to rename just a dozen of them, don’t think about manually hand-picking the right photos, there’s an easier way. 

Create a Renamerlet in Renamer for searching and replacing words in files: 

  1. Click the plus button in Renamer’s toolbar to add a new Renamerlet
  2. Name your Renamerlet and choose the action — Find & Replace
  3. Customize other things, such as whether to apply changes to the name only or name & extension; select or deselect Case Sensitive, etc. 
  4. Type the words or characters you want to replace, then the words or characters you want to replace them with
  5. Drag and drop your files, then run the Renamerlet. 

replace certain words in files

If you use Finder to batch rename files, here’s how you can find and replace words in file names: 

  1. Locate a folder that contains the files you need to rename in Finder
  2. Shift-click to select all files
  3. Click the three-dots icon on top of Finder’s window 
  4. Choose Rename > Replace Text 
  5. Type the words or characters you want to replace, then the words or characters you want to replace them with
  6. Click Rename. 

replace words in file finder

Keeping your folders and files up to date

A little housekeeping on your Mac will go a long way to keeping your files in order and in the right place. If you’re lucky, your file names won’t have to be updated ever, but if they do, at least you now know how to change them manually or using Renamer, which can do it faster and with more accuracy. 

Renamer and Squash (which is ideal for batch renaming images), along with CleanMyMac X, are available for a free trial through Setapp, a platform of more than 230 nifty utilities and apps that make it easier to automate lots of tasks on your Mac and iPhone. 

240+ apps for $9.99
per month

Sign up to Setapp and try them for free.

Security-tested