Hi, this is Gary with MacMost.com.
Today let's take an in-depth look at using the Batch Rename Tool built into the macOS
Finder.
MacMost is brought to you thanks to a great group of supporters.
Go to MacMost.com/patreon.
There you can read more about it.
Join us and get exclusive content.
So if you need to rename a group of files in the Finder you can do that using the Batch
Rename Tool.
The functionality has been around for years but a lot of people still don't know it's
there.
This is the simplest example where I'm just going to change something in the name of a
file.
So I have a bunch files here with the word Info in them.
Let's change that to Document.
Now if you look for the Batch Rename Tool you're not going to find it right away.
It's not going to be anywhere here.
You'll see Rename but where's the Batch Rename Tool?
Well, in order to see it you need selected multiple files.
I'm going to hold the Shift key down and select the last item here so I select all these files.
Now when I go to File instead of Rename it says Rename 4 items.
Batch Rename shows up right here but you have to have the items selected first.
Let's select it and we'll see the Rename tool come up.
You'll have several different options First you'll have to decide which mode you're going
to be in.
Replace Text, Add Text, or Format.
We'll start with Replace Text.
For this you're simply going to look for some text and replace it with something else.
So in this case we're going to look for the word Info and replace it with Document.
Notice we have this example here that shows us what's going to happen.
It chooses the first file that's selected, in this case it was Info space A dot txt.
It's going to tell us that this will rename it to Document space A dot txt.
All the other files will be renamed as well.
Let's use it.
So I'll click Rename here and you can see it renames all the files.
Now the first trick I want to show you is that you can easily Undo this.
Even though I've changed the name on the files, one Undo will undo it all.
So I can go to Edit, Undo or Command Z and I'll get all the original file names back.
So you can try things out and if you make a mistake you can Undo and then try again.
Next mode for the tool, instead of doing Replace Text, you can switch to Add Text.
This will keep the original file name but add some text before it or after it.
So, I can type the word Document here and you can see it will put the word document
after the file.
It will not insert a space so if you want a space there you're going to have to put
it there yourself.
You can go After Name or Before Name.
In this case I would want the space to be after.
So I can insert this and now it changes all of the documents.
Now the most complex rename function is using the Format mode.
You can do a Name and Index, Name and Counter, Name and Date.
Let's start with Name and Index.
What this is going to do is it's going to add a number to files.
I have four files here so I'm going to get numbers one through four.
I can set Before or After Name to where I want the number would be.
So let's try After Name for instance.
You can see the example here.
It's going to do Custom Format.
So in this case it's going to use the word File with a space, I put a space after that,
then the number.
The number you can set to start at 1 or whatever you want to start it at.
Then it will rename all the files using that name and the numbers.
So I can do this and I get files that look like that.
Now there are some hidden things in here.
I can Remove the custom format name completely leaving it blank.
What will happen is the name will be retained, the names like Info A, Info B and Info C.
They will still be there but it will add the numbers after the name or before the name.
Notice here it does insert a space.
If I wanted to add a number after each one I could do that.
Now ordering is kind of interesting here.
Notice how it gave them all numbers 1 through 4.
You can change that.
One way to change that is by selecting the files in a certain order.
I'm going to select File C first.
Then I'm going to hold the Command key down and select A. Then I'm going to select D and
B. Now when I go to Rename them and I'm going to assign a number but I'm going to keep the
file name, I'll do Rename.
You can see C got number 1, A got number 2, D got number 3, and B got number 4.
So it remembered the order that I selected the files and assigned the numbers in that
order.
That can be useful.
Now you can also have a situation like this where you have different Date Modified, you
can see the time is different.
Say I wanted to assign numbers based on the Date Modified.
First I would sort by Date Modified.
So here in this case I get D, C, A, B because that corresponds to the dates.
Now I want to be very careful not to select one and then Shift to select them all because
I'm selecting them in a certain order.
Instead I'm going to have None selected.
Just click on the folder background there and then do Command A. This selects them all
at once.
So now when I go to Rename them, Rename, you can see the numbers are added in the order
of Date Modified.
So if I were to say do that but put it before the name and do a Rename now you can see the
Date Modified and the numbers match up.
If I were then to transfer this somewhere else and not sorted by Date Modified but sort
by Name they would actually still be in the order of Date Modified.
That could be useful as well.
Now there was another mode here.
Instead of Index I could use Counter.
What's the difference?
The difference is leading zeroes.
So you get these leading zeroes here.
00001 and 2 and 3, etc.
So if that's important then you could do it.
Now macOS in the Finder doesn't care if you name the files 1, 2, 3, 4, 5, and then 10,
then 100.
It's going to order them correctly based on the number.
But sometimes some systems or some applications may put things like 1 first and then a 10
as being second because in alphabetical order a ten comes after 1 and then 2 would come
after 10.
So it gets confusing and that's why you do leading zeroes.
Photographers ofter run into this problem when using different apps to look through
all their photos.
Now there is the ability to go and do Rename Files and select Name and Date.
You'd think what would happen then is that you would end up with names that matched the
Date Modified or the Date Created.
But in fact what you end up with are all the same date and time because it's using the
current date and time.
It's not really that useful if you do want to rename your files by the creation date
or the modified date you can do that using Automator or a Shell Script.
But that's a subject for another video.
Sometimes you need to change the extension on a bunch of files.
For instance here I have a bunch of files that use jpeg and maybe I'm trying to upload
into a site and it's not accepting it.
They need to be jpg.
So I can select all of these and go to Rename and I can say Format, Replace Text and I can
use the extension here.
So I can say dot jpeg and change that to dot jpg and Rename and it renames all those changing
those file extensions.
Now you can mix file types and even files and folders when you do this.
So here I've got two folders and four files in here.
I can select these.
I can Rename these items and you can see it includes the folders in another group there.
I'm not sure I'd want to do that but it's good to know that you can.
You can go and use this on multiple folders.
Here I am using the List View, as I have been through this whole tutorial, and I can select
All here and use the Command key to deselect the folders.
Now I have eight files in two different folders.
I can Rename these and I can do something like change the Info to Doc and you can see
it renames them all like that.
You should also note that when you do Replace it doesn't worry about not finding that text
somewhere.
Here I have two files names Doc and two files names Info.
These could be like four hundred files and some of them have Doc and some Info.
But I want them all to be Info.
So I could select all of these and I could do Rename and then say let's change all of
the Doc to Info and Rename.
It only affects the files where there's a match.
What about a situation like this where you have four files named Doc and two named Info.
But if I change all of the Infos to Doc then you could see that this one would change to
Doc B which there already is a file with that name.
So let's see what happens when we do that.
Rename Info to Doc.
Now there should be a conflict and indeed there is.
It simply resolves that by putting a space and the number 2 after any of the files that
get in the way.