Renaming Multiple Files in Batches on a Mac

hi this is Gary with let me show you how to use the batch rename tool on your [Music] Mac Macos is brought to you thanks to a great group of more than 2,000 supporters go to 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 but 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 select others or alternatively if I just want 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 I 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 and 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 find 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 and notice here gives me an example it shows that one of these files will be renamed as picture 1. jpeg so I get an idea what’s going to happen and notice that these files are different they have different numbers after them they’ve got different extensions here’s one that’s H 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 you can do with this for instance you can add spaces so I can look for photo replace with picture plus a space and you can see how I get a nice little space there I could also look for extensions instead so let’s say if I want to change jpg to. jpg I can do that and 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 hiic file there and you can see that doesn’t change now before we move on to the next mode I want to show you that you can undo a batch rename like this so even though I’ve made multiple Chang 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 then you realize it made a mistake and it changed hundreds of files command Z will take you back to how they all were named before now let’s look at the next mode next mode is add text so this simply adds sub text to the existing name so right now it’s blank and you could see as an example chose photo one jpeg this first file right there if I were to add something like my you could see how it would change it it will put the word my afterwards or I could switch to before and 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 first thing you need to decide is the type of format you can have name and index 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 filespace 1. jpeg I could switch to have the format go before the name so puts the one before the word file and I can have the number start at something else so I can have them start say at one 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 file 101 and I continue on it’s not taking anything from the old name so these files could have been a b c and d and now they’d 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 not have anything there it keeps the file name that’s there now so the first one will be photo one space one if I rename you can see keeps all the original names adds a space and then the format or the index in this case now the next name format option is name en counter which puts a bunch of zeros before the number now on Max 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 and the last format here is name and date so it’s going to put a date format like this afterwards unfortunately this is not very useful as it’s giving all the files the same name because it’s 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 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 pH photo this to be the second third and fourth photo like that so the opposite order so 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 could do it any order I want so I can you know 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 an index I’ll start at one in this case and I’m going to give it a new name I don’t want to go and use Photo because as it renamed each one it’s going to conflict with ones that were before in other words when it tries to rename photo 4 to photo one it’s going to see photo one’s 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 well now I’m going to rename like that and now alphabetically picture comes after photo and I could see it’s renamed them all picture one to picture 4 but it’s done it in the order in which I selected them not the order they were listed here in the finder so batchy name can also be a handy way to manually reorder files in a folder this is a pretty basic batch rename tool it’s very useful in a lot of cases but for more complex things you’re going to either have to use the terminal or perhaps a shortcut hope you found this useful thanks for watching [Music] if you like this video click the Thumbs Up Button below to let me know I publish new tutorials each weekday hit the Subscribe button so you don’t miss out

This Post Has 19 Comments

  1. @AnilAtluriWord

    Thank you Gary! Never paid attention to that drop down options >Rename! Saves me a lot of time. 🙂

  2. @garudasomanna

    Just amazed at the vast knowledge you have and share it in such a fast way. You are a marvel Gary. Thanks.

  3. @bikeman5

    i tried a test, (img_210.jpg thru 213) i wanted (“deer on tatnic rd 1” thru 4) no matter how i tried it wouldnt replace all the text to new text, it left img_210 or .jpg you couldn’t get rid of all the text in the name. if you use format name and index then command option i and hide ext, that works, is that the easiest way?

  4. @greebo7857

    Far out. I knew all of this except the Command/Shift to assign order to the selection. That's great, and explains something that I thought might be a bug.. Thanks Gary.

  5. @ryguyver

    I can't believe I didn't know this feature existed in macOS! Do you know in what OS version it was added?

  6. This is a very useful tutorial. I had no idea you could batch change names. Thank you Gary.

  7. Sorry I’m late! Avery useful and informative video tutorial today! Thank you, Gary! 👏🏻❤️

  8. When it comes to renaming the file extensions that can cause file corruption. Say rename .png to .jpg to reduce photo size, unless it is done by software that is reprocessing the it does not work. Does the mac OS reprocess or just rename?

  9. @klausnurmi5836

    Thank you, Gary, again for your clear and instructive videos. I am still learning how to use my iMac 24" M1. For example I can´t transfer photos for Photos app which is located in the external hard drive. Maybe some day I can.

  10. @EElgar1857

    A good tip that I didn't know about! I've used an app called "Name Mangler" for many years, and it has quite a few additional features, but it costs a few dollars.

  11. @karayuschij

    I did not know about that, thank you.
    I have always used Better Finder Rename (more powerful but not free)

  12. @neekerbreeker

    This is terrific, thanks! I've been using Macs for – lol, we'll just say a looong time 🦖- and just found this channel recently. I've been learning so much here! I have an Automator workflow set up to change spaces in filenames to underscores. I'm glad I learned how to do it and I use it a lot, but this will be really handy.

  13. @DirkKuepper

    If you need more take a look at "Better finder rename"

  14. @Erin-Thor

    Once again you have taught an old Apple user who thought I knew all of this a few new tricks‼️ Thank you! 💙👍🏽

Leave a Reply