You can rename multiple files using the Finder's hidden Batch Rename tool. You can change matching text in all file names, or add an index number to each file's name.
You can also watch this video at YouTube.
Watch more videos about related subjects: Finder (314 videos).
You can also watch this video at YouTube.
Watch more videos about related subjects: Finder (314 videos).
Video Transcript
Hi, this is Gary with MacMost.com. Let me show you how to use the Batch Rename tool on your Mac.
MacMost is brought to you thanks to a great group of more than 2000 supporters. Go to MacMost.com/Patreon. There you could read more about it. Join us and get exclusive content and course discounts.
Now if you want to rename a single file on your Mac you can do that pretty easily by simply selecting the file. If you click on it a second time or press the Return Key it enters Rename Mode and you can type a new name. You could also, with a file selected go to File and then Rename and it enters that same Rename Mode. But what if you want to Batch Rename some files? You want to change all of their names. Maybe adding something to them or numbering them.
Well you can do that using the same Menu item. The trick is to first select multiple files. So here in List View I can click to select this first file here and then Shift Click to select more. I can even Command Click to select or deselect others. Alternatively, if I just wanted to rename all the files in this folder I can use Command A or Edit, Select All to select all the files.
Now that I have multiple files selected I can use the Batch Rename tool by going to File, and notice that Rename now has three dots after it. That means that a dialogue is going to appear if I select this. It won't just do something on its own. If I use it you can see I get to the Rename Finder Items tool or the Batch Rename tool. Now there are three modes for the Batch Rename tool. There's Replace Text, Add Text, and Format. Let's start with the simplest, Replace Text. It has two fields here. Fine and Replace With. So I can Find some text that may be in one or more of these file names and replace it with something else. So, for instance, I can type Photo and then replace with Picture. Notice here it gives me an example. It shows that one of these files will be renamed as picture1.jpg. So I get an idea what is going to happen. Notice that these files are different. They have different numbers after them. They've got different extensions. Here's one that is heic. But in all of them that are selected it's going to change the word photo to the word picture. So if I click Rename you could see it changes all of them there.
Now there are a lot of tricks that you can do with this. For instance, you can add spaces. So I can look for photo, replace with picture plus a space. You can see how I get a nice little space there. I can also look for extensions instead. So let's say if I want to change .jpeg to .jpg I can do that. It will change those. But the ones that don't have it in it, it won't make any change at all. So look at the heic file there and you can see that doesn't change.
Now before we move onto the next mode I want to show you that you can Undo a Batch Rename like this. So even though I've made multiple changes here I can simply use Edit, Undo or Command Z and you can see how it Undoes the Batch Rename. So as long as you do that immediately afterwards you can fix a mistake if you thought you were changing it to one thing and the you realize it made a mistake and it changed hundreds of files Command Z will take you back to how they were all named before.
Let's look at the next mode. The next mode is Add Text. So this simply adds some text to the existing name. So right now it's blank and you can see as an example it chose Photo1.jpg. This first file right there. If I were to add something like My you could see how it would change it. It would put the word My afterwards. Or I can switch to before. Then I could add, say, a space right there. So you can see how I could add My space to the beginning of each one of those. So I can Rename like that.
Now let's look at the last mode. Format. So what Format will do is either replace the name or add something to the name. So the first thing you need to decide is the type of Format. You can have it Name and Index or Name and Counter or Name and Date. So Name and Index puts a number after the file name. So here's the Custom Format is the word File with a space after it and you can see it's going to put an index. So File space1.jpg. I can switch to have the Format go before the name, so it puts the 1 before the word file. I can have the number start at something else. So I can have it start at say 100, like this, or maybe better yet 101. Now if I Rename notice how it changes all of them and it does it for all the files keeping their file extension. So now I start with File101 and I can continue on. It's not taking anything from the old name. So these files could have been A, B, C, & D and now they would be called File 101 to File 104.
Now note you can change Custom Format to whatever you want. So I can put, say, Picture and I've still got that space after there, like that. If I were to eliminate this and not have anything there it keeps the file name that is there now. So the first one will be Photo1space1. If I Rename it keeps all the original names, add the space and then the Format or the Index in this case.
Now the next name Format option is Name and Counter which puts a bunch of zeros before the number. Now on Macs you don't really need to have all the zeros before in order for things to be sorted correctly in the Finder. But some other devices might. Like maybe you're making a USB stick of these photos to show them on some TV that you can plug a USB stick in and then it will list the photos and you find that it works better if you pad a bunch of zeros to it. So you have the ability to do that.
The last Format here is Name and Date. So it is going to put a date format like this afterwards. Unfortunately this is not very useful as it is giving all the files the same Name because it is using the current time right now, not the creation or modified time for the file. So it really has limited use. Maybe if you had a folder filled with a bunch of different types of files and you wanted to rename all those with the current time right now for archiving.
Now here's a tip that most people don't know. You can Rename files using an index and set it to a specific order by selecting the files in that order. So, for instance, let's say I want to take the first four photos here. To make it easier to see I'm going to go to View Options and enlarge the icons there like that. So now I want this to be the first photo. This to be the second, third, and fourth photo like that. So the opposite order. All I need to do is select the first one, then Command Click to select the second. Then Command Click on the third and Command Click on the fourth. I can do it in any order I want. So I can add another one here as the fifth if I want. Now I want to go to File Rename and I want to use the Format, Name and Index, I'll start at one in this case. I'm going to give it a new name. I don't want to go and use Photo because as it renames each one it is going to conflict with ones that were before. In other words when it tries to rename the photo 4 to photo 1, it's going to see photo 1 is already there and it's not going to work as you would expect. So instead I'm going to, say, Picture and give it a space afterwards. Now I'm going to Rename like that. Now alphabetically picture comes after photo and I can see it's renamed them all, picture 1 to picture 4, but it has done it in the order in which I selected them, not the order they were listed here in the Finder.
So Batch Rename can also be a handy way to manually reorder files in a folder.
This is a pretty basic Batch Rename tool. It is very useful in a lot of cases. But for more complex things you're going to have to either use the Terminal or perhaps a shortcut. Hope you found this useful. Thanks for watching.
What rename lacks: using just 1 or 2 leading zeroes (file01, file02, etc.).
But it's easy with a second step:
1. Rename the group with Format > Name and Index, using a start number of 100 (if you have <100 files) or 1000 (< 1000 files).
2. Rename the same group with Replace Text using the Custom Format value from the first step plus the digit 1. (So if you had renamed to pic101, etc., now replace "pic1" with "pic".)
You now end up with pic01, pic02, etc.
Awesome thanks brother!.. ❤️🙏😊
Wow! I wish I had known about this feature years ago !
I had no idea this feature existed, even after using MacOS for years. Thank you.