If you’ve ever imported hundreds of photos from a digital camera (resulting in useless file names like IMG_001.jpg, IMG_002.jpg) or needed to standardize a folder of client documents, renaming them one by one is an exercise in frustration. While you could write a shell script, macOS includes a powerful, built-in graphical tool called Automator that allows anyone to build complex, automated workflows without writing a single line of code.
In this guide, we will build a custom “Quick Action” that allows you to highlight any group of files in Finder, right-click them, and instantly rename them sequentially.
Step 1: Create a New Automator Workflow
- Open the Automator application (found in Applications, or by searching with Spotlight).
- A dialog box will ask you to choose a type for your document. Select Quick Action (on older versions of macOS, this may be called a “Service”) and click Choose.
Step 2: Configure the Quick Action Input
Look at the top right of the main workflow window. You need to tell Automator what kind of data to expect when you trigger the action.
- Set “Workflow receives current” to files or folders.
- Set “in” to Finder.app.
Step 3: Build the Workflow Actions
The left side of the Automator window contains a library of actions. We will drag these into the main workflow area on the right.
- In the Library search bar, type Rename.
- Drag the Rename Finder Items action into the main workflow area.
- Automator will display a warning asking if you want to add a “Copy Finder Items” action first to preserve the originals. Click Don’t Add (unless you specifically want duplicates).
Step 4: Configure the Renaming Rules
The “Rename Finder Items” action box is highly customizable. You can use it to add text, replace text, or change capitalization. For this example, we will make it sequentially number the files.
- Click the drop-down menu at the top of the action box and change it from “Add Date or Time” to Make Sequential.
- Select Add number to and choose new name.
- In the “New name” text box, type your base name (e.g.,
Project_Screenshot_). - Check the box for Make all numbers [ 2 ] digits long (this ensures
01,02,03so they sort correctly, rather than1,10,2).
Step 5: Save and Test the Quick Action
- Go to File > Save (or press Cmd + S).
- Name your Quick Action something descriptive, like “Batch Rename Sequential”, and click Save. You can now close Automator.
To use your new tool:
- Open Finder and locate a folder of files.
- Highlight all the files you want to rename.
- Right-click (or Control-click) on the highlighted files.
- Scroll down to the Quick Actions menu (or “Services” on older OS versions).
- Click your newly created Batch Rename Sequential tool.
Instantly, every selected file will be renamed based on the rules you defined, saving you hours of tedious manual data entry.