Renaming files in macOS has always been easy and you just select a file, press Enter and type in a new name. What about bulk renaming, search and replace in filenames? Yes, it does that too.

At one time you had to use a third party file renaming utility if you had to rename more than half a dozen files, which is about the limit of most people’s patience, or write a complicated Automator script to do the renaming batch job. It was a painful experience.

Select multiple files in Finder

Fortunately, macOS has had a great file renaming utility built right in to Finder for the last few versions. It is very easy to use this feature and it is a good time saver. To see how the bulk rename facility works, open a Finder window on the desktop and select a group of files.

Press Command+A to select all the files in a folder, or click the first and Shift+click the last to select the files in between, or Command+click individual files to add them to the selection.

Bulk rename files in Finder

Ctrl+click the first file in the list and select the Rename x Items option from the menu that is displayed.

Search and replace in filenames

There are several methods for renaming files and when Replace Text is selected in the menu in the top left corner, you can enter one or more words in the Find box and enter replacement text in the Replace with box. In this example, Screen Shot is being replaced with Pic and an example is displayed in the bottom left corner so that you can check that it is what you want before proceeding to change all the files.

This really is a search and replace and if a selected file does not have the text in the Find box, it is not changed. You can therefore press Cmd+A to select all the files in a flnder window, but only change some of them using Replace Text.

Add text to filenames

Search and replace in filenames is useful, but Add Text is a much simpler function. One or more words can be added to the start or the end of the filename.

Choose a new filename format

The most powerful features are provided with the Format option. In the Name Format menu are three items and the first is Name and Index.

You provide a filename and Finder will automatically add numbers starting at whatever value you want. In my example I am renaming all the files to Picture and adding a number to the end starting with 1 for the first file, 2 for the second and so on.

This is excellent, but there are some variations of this that you can use. Instead of Name and Index, you could select Name and Counter. This is basically the same except that the numbers have leading zeros. So instead of Picture1.png, it would be Picture001.png. There is also an option to rename the files by providing a name and Finder will add the date too.

These new methods for the bulk renaming of dozens of files make life a lot easier. You no longer have to be a programmer and write your own Automator script or spend time looking for a file rename utility on the internet.

There was one surprise though. A group of half a dozen files on the desktop were selected, then the bulk file rename tool was used to rename them all. They were renamed, but Finder appears to have renamed them in a random order. So instead of the files being Pic1.png, Pic2.png, Pic3.png and so on, they became Pic3.png, Pic5.png, Pic1.png and so on.

It isn’t how Finder chose the order and it didn’t seem logical. The solution was to open a Finder window, select the Desktop and click one of the headings to sort the files by name, date, size and so on. When they are renamed, Finder sticks to the order you select.

Undo bulk file renaming

Suppose you use this feature to rename a bunch of files, but afterwards you decide that it is not such a good change after all. What are your options?

Well, you could simply use the bulk rename function again and rename everything. However, pressing Command+Z will restore the previous filenames for all the files you changed. Command+Z is a universal Undo function and it works with Finder operations.