At some point in time, a lot of us have come across a situation where we find the need to rename multiple files at once. Be it images, videos, apps, or PDFs, renaming every single one individually is a daunting task. Luckily, every Mac has two different options that allow you to rename multiple files at once. So, let’s dive in and look at these methods.
Method 1. Rename Multiple Files using Finder
With OS X Yosemite, Apple introduced a new built-in tool in the ‘Finder’ app to allow you to rename multiple files at once. Here’s how you can do it.
- Launch the Finder app and locate the files that you want to rename.
- Select all the files by either: shift + click or command + a.
- Open the actions menu by either: control + click, a two-finger tap on the trackpad, or clicking the actions button with a gear icon, on the top menu.
- Select ‘Rename [X] Items…’ from the list.
- Now, in the ‘Rename Finder Items’ box, you will be greeted with three different options: ‘Replace Text’, ‘Add Text’, and ‘Format’, each with a different purpose, under a dropdown button.
Option 1: Rename Finder Items with Replace Text
The ‘Replace Text’ option comes in handy when you want to find and replace a portion of the existing file name. For instance, if you have multiple images that contain some random gibberish like ‘DSC’ in their name, you can find and replace them with a name that you want you using this option.
1. Select ‘Replace Text’ in the ‘Rename Finder Items’ box.
2. Now, you enter the part of the name that you want to find and replace with another text, and enter it in the input box next to ‘Find’.
3. Similarly, in the box beside ‘Replace with’, enter the name/text that you want to replace the existing name with, and hit ‘Rename’.
Option 2: Rename Finder Items with Add Text
With the ‘Add Text’ option, you can add text to the existing file name, before or after.
1. Select ‘Add Text’ in the ‘Rename Finder Items’ box.
2. In the input box beside the ‘Add Text’ dropdown box, enter the text you want to add to the existing file name.
3. Now, next to the input field, select either ‘after name’ or ‘before name’ from the dropdown box to add your text to after or before the existing name, respectively. And then, hit ‘Rename’.
Option 3: Rename Finder Items with a Format
If you have a specific preference in renaming the files or want more control in naming, then you can choose the ‘Format’ option.
1. Select ‘Format’ in the ‘Rename Finder Items’ box.
2. Click on the dropdown menu next to the ‘Name Format’ option, and select amongst ‘Name and Index’, ‘ Name and Counter’, and ‘Name and Date’ options.
3. Now, in the input box beside ‘Custom Format’, enter the name, and in the input box beside ‘Start numbers at’, enter the number that you want the files to contain.
4. Additionally, choose between the ‘after name’ and ‘before name’ options next to ‘Where’, to add name or number before or after.
5. Once done, hit ‘Rename’.
Method 2. Rename Multiple Files using Automator
Similar to how we used Automator to resize multiple images, we can utilize the same built-in app that we used to create a workflow to rename multiple files in one go.
1. Open the ‘Automator’ app by opening the Launchpad and going into the ‘Others’ folder, or by hitting the command + space combination to open ‘Spotlight Search’ and then searching for Automator.
2. Click on ‘New Document’.
3. Now, from the ‘Choose a type for your document’ box, choose ‘Workflow’.
4. Next, make sure that the ‘Actions’ tab is highlighted, and click on the ‘Files & Folders’ option under Library in the left pane.
5. Now, find the ‘Get Selected Finder Items’ option from the list and drag it to the right pane. You can also search for it in the search bar located next to ‘Variables’.
6. Similar to the previous step, find the ‘Rename Finder Items’ option from the list and drag it below the previous item.
7. Next, on the pop-up menu that appears, click on ‘Don’t Add’. You can also opt for ‘Add’ to create copies of the renamed files if you want.
8. Now, in the ‘Rename Finder Items’, tap on the dropdown menu and select ‘Make Sequential’.
9. Next, for the ‘Add number to’ option, select ‘new name’ and enter the name that you want to give your files in the input field.
10. From the ‘Place number’ dropdown menu, select ‘after name’ or ‘before name’ accordingly, and in the input field next to ‘Start numbers at’, enter the number that you want the name to contain.
11. Further, additional formatting can also be done by changing the separator from the dropdown menu next to the ‘separated by’ option and choosing from a dash, period, space, underscore, or nothing in for your file name.
12. Finally, save the workflow by pressing command + s, and give the workflow a name that you can remember. For future references, let’s call the workflow, ‘Rename Multiple Files’.
Now, with the workflow ready, all you need to do is select the files that you want to change the name of, and then, trigger a right click by either: control + click, or double finger tap on the trackpad. Once done, select ‘Services’ from the list of options, and then, click on the name of the workflow to execute it.
And in case you are feeling lazy, and don’t want to perform the execution by going through all the clicking and selecting, you can create a custom shortcut for your workflow, using which, you can execute the workflow by simply pressing a key combination.
Assigning a Keyboard Shortcut for the Workflow
1. Open ‘System Preferences’ and select ‘Keyboard’.
2. On the next screen, tap on ‘Shortcuts’ from the top menu.
3. In the left pane, tap on ‘Services’, and from the list that pops-up on the right pane, select the service that you just created.
4. Next, select the service and click on the ‘Add Shortcut’ option.
5. Now, enter a key combination that you want to assign for the workflow.
Now, to execute the workflow, select the files that you want to rename and press the key combination. As soon as it’s done, the workflow will run itself and rename all the selected files for you.
And that’s it!
By now, you should have renamed all your selected files in one go. However, a thing to remember with this method is that it is ideal for situations when you want a specific name format for all your files, and for instances when you want a different name, you can either opt for the first method or make changes to the existing workflow, and you’re all set.