You have a million files to rename on your computer, and you’re not looking forward to the long and tedious task. Don’t panic. You don’t have to rename all your files manually. We’ve looked at ways to batch rename files in Windows, but there are also easy ways to do this on a Mac.
Back in the day, you had to select each individual file, press Enter, and select the part of the filename to rename, or retype the whole thing. Now, you can do fancy tricks when renaming multiple files, like replace text in filenames, add numbers or other text to the beginning or end of filenames, or remove text from filenames.
There are several ways to batch rename multiple files on your Mac. Today we look at using the Rename feature in Finder, creating an Automator workflow, and using a free app called NameChanger to rename multiple files.
Batch Renaming Multiple Files Using Finder
Finder now includes a very useful Rename tool. You can replace text in a filename, add text before or after the current name, or choose a new name format and add an index, counter, or date before or after that name.
Selecting Files to Rename
To use the Rename tool in Finder, open the folder in Finder containing the files you want to rename and select them.
Next, press Control and click on the selected files. Select Rename X Items from the popup menu. The “X” indicates the number of files that are selected to rename.
Replacing Text in Filenames
On the Rename Finder Items popup window, you can choose to replace text in the names, add text to the names, or change the name format.
First, we’ll look at replacing text, so select Replace Text from the dropdown list.
Enter the text you want to replace in the Find box. Then, enter the text you want to add in its place in the Replace with box. You can use this method to remove text from filenames. Simply leave the Replace with box blank. The Example preview shows you how the filenames will look after renaming. Click Rename.
Adding Text to the Beginning or End of Filenames
To add text to filenames, select Add Text from the dropdown list on the Rename Finder Items dialog box.
Enter the text you want to add and then select whether you want to add the text before or after the name. Then, click Rename.
Replacing the Name and Adding an Index, Counter, or Date
If you want to name many files with the same name and add an index or date to the names, select Format from the drop-down list on the Rename Finder Items dialog box.
Select an option from the Name Format dropdown list to indicate whether you want to add an Index, a Counter, or a Date to the name. Then, select after name or before name from the Where dropdown list.
Next, enter the text you want to use for each filename in the Custom Format box. If you selected Name and Index or Name and Counter from the Name Format dropdown list, enter the number you want to start from in the Start numbers at box. For the Name and Date option, you only get one date format.
An example of how the filenames will look once they’re renamed displays below the Custom Format box. If you leave the Custom Format box blank, a space and the Index, Counter, or Date will be added after the current name.
Undoing the Rename Process in Finder
To reverse the changes and go back to the previous filenames, go to Edit > Undo Rename in Finder.
Batch Renaming Multiple Files Using Automator
Your Mac includes a very handy tool called Automator that does exactly what it says in the name — it automates tasks. It’s similar to using batch files on Windows to automate tasks, but it’s easier to use.
It’s easy to set up an Automator Workflow to batch rename multiple files.
Creating a New Workflow
Open Automator from the Applications folder or Launchpad, or by searching for it in Spotlight.
A dialog box displays allowing you to open an existing workflow, or create a new one. Click New Document.
In the Choose a type for your document box, click Workflow. Then, click Choose.
Building a Workflow to Batch Rename Files
Now, we’re going to build the workflow with actions.
To begin, select File & Folders on the far left under Library. Then, drag the Get Selected Finder Items action to the gray box on the right.
Next, drag the Rename Finder Items action under the Get Selected Finder Items action on the right.
A dialog box displays asking if you want to add a Copy Finder Items action to the workflow. This allows you to make copies of the files in case something goes wrong. The original files remain unchanged.
To automatically add the Copy Finder Items action, click Add.
By default, the duplicate files will be saved on the desktop and not in a folder. If you have a lot of files, you should save them to a folder. Create a folder on the desktop you can choose as the destination.
On the Copy Finder Items action box, select Other from the To dropdown list.
Navigate to the folder you created on your desktop (or elsewhere) and click Choose.
Now, choose how you want to rename your files. Select an option from the dropdown list at the top of the box. You can add the date or time, add text before or after the file name, change the case of the filename, make the filename sequential with incrementing numbers before or after the filename, or replace specified text with a new string of text.
The other options change depending on the option selected in the dropdown list. Select the options you want, referring to the Example at the bottom of the action box to see how the filenames will look.
Saving the Workflow as an App
You can add your workflow to the Dock for easy access. Go to File > Save.
Navigate to the folder where you want to save your app. You can put it in the Applications folder (or any other folder). Enter a name for the app in the Save As box and click Save.
Adding the Batch Rename App to the Dock
To add the app to the Dock, drag the .app file to the Dock.
Using the Batch Rename App to Rename Files
Now you can use your new app to rename multiple files. Open Finder and select the files you want to rename. Drag the files to the Batch Rename app icon on the Dock.
Your files will be renamed and either duplicated to the folder you specified, if you chose that option, or they will replace the original files.
Batch Renaming Multiple Files Using NameChanger
You can also use a free app called NameChanger to batch rename files. It provides some of the same options for renaming multiple files as Finder and Automator, plus an additional useful feature.
Download NameChanger and extract the ZIP file. Either run the .app file from the current folder, or copy or move it to the Applications folder and run it from there.
Adding Files to be Renamed
NameChanger opens to a simple interface. Click Add to add files to be renamed.
Navigate to the folder containing the files you want to rename, select them, and click Open.
You can also drag selected files from Finder to the NameChanger window to add them.
There are a few options you can set in NameChanger. Go to NameChanger > Preferences to access them.
Change options as you see fit. The Hide extensions by default option is useful for some of the renaming methods. We’ll talk more about that later.
Checking and Unchecking Files
All the files you added are checked by default. Use the File menu to quickly change which files are checked and not checked.
Selecting a Rename Method
The dropdown list in the middle of the bar above the file list provides various methods for renaming files. Select the one you want. For our example, we’re going to use the Wildcard method. This allows us to use the asterisk (*) and question mark (?) to indicate text to be replaced.
Use the asterisk to replace all the text and the question mark to replace a single character. For example, we want to replace the entire filename, so we enter “*.jpg” in the box on the left. Then, we enter the text we want to replace it with in the box on the right. Numbers are automatically added to the filenames.
The right column shows how the filenames will change when you rename the files. Click Rename on the toolbar to rename the files as specified.
Adding Sequential Numbers to Filenames
Use the Sequence method to add sequential numbers to the beginning (Prepend) or end (Append) of the filenames.
If you choose to add numbers to the end of your filenames, you must hide the file extensions, as we mentioned earlier. If you don’t, the numbers are added after the file extension, not at the end of the filename.
If you didn’t turn on the Hide extensions by default option in the Preferences, you can also hide them by going to Options > Hide Extensions.
Reordering Files Using the Image Browser
If you’re renaming image files and you want to reorder them, you can visually reorder the files in NameChanger. Click Image Browser on the toolbar.
Thumbnails of your images display in a separate window in numerical order. To reorder the files, drag the file you want to move to the desired location.
The filenames are renumbered automatically in the list.
Saving the Current Rename
If you’re going to use the current rename repeatedly, you can save it and reload it when needed. To save the current rename, go to Renames > Save Current Rename.
Enter a title for the rename and click Add.
Deleting a Saved Rename
If you no longer need a saved rename, you can delete it. Go to Renames > Manage Saved Renames.
Select the rename you want to delete and click the minus button.
Loading a Saved Rename
To use a saved rename, first add the files to be renamed. Then, go to the Renames menu and select the rename from the list at the bottom of the menu.
Go Batch Rename Your Files
Hopefully one of these methods meets your needs for batch renaming files on a Mac.
What’s your preferred method of batch renaming files? Have you found a different tool you like? Share your experiences and recommendations with us in the comments.