3 Easy Ways to Batch Rename Files on the Mac

Batch renaming files has never been incredibly easy, or even possible at all, out of the box in OS X. If you want to batch rename files, you have to look outside, to third party apps or maybe Automator workflows. We’ll look at two apps that accomplish the same task, batch renaming files, in different ways, and we’ll even create our own application in Automator that batch renames files exactly how we want it done.

Purposes of Batch File Renaming

If all of your images are called something like IMG_0974.JPG, that’s not very descriptive and isn’t going to help you find all your snaps from your trip to Costa Rica.
There are a few different reasons I can easily think of to batch rename files, including renaming images so they make more sense, organizing documents within a folder, or separating out files by the date they were created. If all of your images are called something like IMG_0974.JPG, that’s not very descriptive and isn’t going to help you find all your snaps from your trip to Costa Rica. Similarly, when I’m researching, I like to prepend a topic keyword to the filenames of all my accompanying documents, so I know what belongs to which project.
Doing that by hand, especially to dozens of files and folders, is slow going, and Mac OS X hasn’t provided a way for us to batch rename files natively. That’s okay, because we can still get the job done. We’re just going to need some extra tools.
Before we get started, though, let’s talk backup. Hopefully, you’re already backing up your computer, but because it’s possible in the course of batch editing filenames to accidentally rename your files something weird, unrecognizable, and completely unusable, it’s not a bad idea to also copy your files to a new folder before you get started.

NameChanger

NameChanger, an application for batch renaming files, is free to download. If you like it, you can make a donation to the developers on the download page. Load up a list of files into NameChanger, make your changes, and preview how your filenames will be transformed before the changes are applied. It’s hard to argue with free, but there are some limitations to what NameChanger can do. We’ll go step by step through a batch renaming operation and see how far the application can take us.

Step 1: Add Files to NameChanger

If your files or folders are all in the same location, just select them all and drag them to the NameChanger window. If the files you’re renaming are all over the place, though, it can be tedious to open Finder window after Finder window. In that case, click Add, and browse until you’ve found your file. Repeat this process until you’ve got all your files into the NameChanger window.
Get your files into NameChanger. They'll appear in the left pane.
Get your files into NameChanger. They'll appear in the left pane.
You can click Remove if you decide you don’t want to change a file’s name after all. Because there are lots of different ways to rename files with NameChanger, if you decide you’d like one rename process applied to all of your files and a second process applied only to some, you can deselect files to the left of the filename. When you’re ready for them to be included in the batch renaming again, just reselect them.

Step 2: Set Your Options

Before you go any further, click Options, and select Hide Extensions. This will keep NameChanger from overwriting your extensions. If you forget this step and make the wrong move, you’ll have to go back and add in all your extensions again or OS X won’t know what to do with all of your files.
Make sure to get everything straight in your preferences before you move forward.
Make sure to get everything straight in your preferences before you move forward.
NameChanger can get fussy if you try to name two files the same thing. With unique names turned on, a digit will be appended to identical filenames.
While you’re there, you can also decide whether you want NameChanger to ignore case or force unique names. That first one is up to you, but I recommend you choose to force unique names, as NameChanger can get fussy if you try to name two files the same thing. With unique names turned on, a digit will be appended to identical filenames.

Step 3: Change Your Filenames

There are several different ways to rename your files, and you can use a combination of batch renaming methods, if you’d like. Just be careful about what order everything goes, because if you use a process that replaces the current name after you’ve added your descriptive prefix, it’ll all end in tears. If you’re worried about creating bizarre or unusable filenames, you can create a copy of your files in another folder before you start.
The drop-down gives your all your renaming options.
The drop-down gives your all your renaming options.
To add a keyword to a file name, choose Append or Prepend from the drop-down and add your text in the field to the right. If you choose to append the keyword, it will appear at the beginning of the filename, making it really easy to sort the files alphabetically. Prepending the keyword or any other text will preserve whatever’s at the front of the filename but still allow you to organize or search for your files based on the new name.
If you’re batch renaming several files with similar names, you may not be able to complete the transformation if the output filenames will be identical.
Remove Characters will chop off a bit of the front or the end of a filename. You’ll have to input a range based on the total number of characters in the title, which can be tedious, though. Also, be careful, because if you’re batch renaming several files with similar names, you may not be able to complete the transformation if the output filenames will be identical.

Step 4: Date and Number Your Files

NameChanger will add a date to your filenames so you can sort them chronologically. Again, you can add the date to the beginning or the end of your filename, whichever works best for you. NameChanger lets you tack on either the date the file was created or a custom date of your choosing. You can tag it with today’s date or really any date in the past or future. You’re kind of hamstrung, unfortunately, by the date formats available. If you want the YYYY-MM-DD format, for instance, you’re out of luck, unless you also want to add how many seconds are left until midnight, too.
Add a date to your filenames. It can be the date the files were created or the current date.
Add a date to your filenames. It can be the date the files were created or the current date.
I saved my favorite rename transformation for last, Sequence. With this process, you can both rename and number your files. For instance, if you have a bunch of similar text files with lots of different filenames, you can rename them all FILE-001.TXT, FILE-002.TXT, FILE-003.TXT, etc. NameChanger will replace the entire original filename if you want, or you can just tack the sequence onto the beginning or the end. Once NameChanger starts rolling, there’s no turning back, so make sure you’ve got your files ordered how you’d like: alphabetically, by file date, or a custom arrangement.
Change the filename and tack on a number to keep everything organized.
Change the filename and tack on a number to keep everything organized.

Step 5: Save Your Rename

If you plan on renaming files in a similar way often, it’s likely worth it to save your rename process. In the Renames menu, select Save Current Rename. Give your rename a title, and it will appear in a list in the Renames menus. Should you find you’ve gone transformation crazy and saved too many renames, they can be deleted by selecting Manage Renames.

Renamer

Renamer, another great tool for transforming filenames. While it doesn’t do many more filename transformations, it does have plenty of other features to recommend it, including rename workflows. You won’t have to change the text of your filename and then add the creation date as part of a separate action; Renamer will do it all in one move. We’ll figure out how to set all of that up and then save it for later, so you can use the same workflows over and over again.

Learn more about Renamer.

Step 1: Drop Files in the Renamer Window

We did this before for NameChanger, so I’m not going to get too in depth here. Drag and drop, click the plus sign in the bottom left, or hit up Add Files in the File menu. Changed your mind? Pull your files back out with the minus sign or either of the File menu Remove commands.
The unchanged files will be in the left pane.
The unchanged files will be in the left pane.

Step 2: Decide How to Apply the Transformations

Unless you have a really good reason, editing the extension is probably a bad idea, so it’s best to stick just to the filename.
Click the gear in the upper right and choose whether the rename process will apply to just the filename, the filename and suffix, or the suffix only. If you include the suffix, you’re going to end up editing the extension, and unless you have a really good reason, that’s probably a bad idea, so it’s best to stick just to the filename.
There are additional options available by clicking the gear or accessing the drop-down to the left.
There are additional options available by clicking the gear or accessing the drop-down to the left.
Just to the left of the gear is a drop-down that will let you edit how the new filename is output. You can remove all of the whitespace or convert it to MS-DOS if you don’t like filenames longer than eight characters. Renamer will also convert your boring old English filename to ASCII German or French, if you’re into that.

Step 3: Create Your New Filenames

Each rename action will be completed in order, so make sure the rename to be completed first is on top, or you may accidentally overwrite your own changes.
Unlike NameChanger, you don’t have to run each rename operation separately in Renamer. Instead, you can stack them as a workflow in the right pane. Each rename action will be completed in order, so make sure the rename to be completed first is on top, or you may accidentally overwrite your own changes.
You can edit the filename in a lot of different ways, all with a single rename.
You can edit the filename in a lot of different ways, all with a single rename.
As before, you can insert a text keyword at the beginning or end of your filenames, remove pieces of your filenames, or overwrite your filenames entirely. Use Find & Replace to remove specific chunks of text from your filename and replace them with something more appropriate. If you leave the Replace field blank, whatever matched the Find field will just be deleted. If you want everything upper- or lowercase, you can do that, too.
Renamer will let you add not only a date to a file, but you can also add a time as well. Your date/time can be when the file was created, when it was last modified, or the current time and date, all selected from the Date/Time drop-down. Your variables will be much more customizable here than in NameChanger, and you can decide exactly how everything will appear in the final filenames.
Edit the date and time associated with your files's names or create a sequence, as before.
Edit the date and time associated with your files's names or create a sequence, as before.
If you’d like to create a sequence of files, Renamer will number them for you. You can indicate the new filename and either append it to the current filename or replace it altogether. Numbering can be used together with the character rewrite and date/time rename transformations to create entirely new filenames loaded with information.

Step 4: Save Your Preset

With saved presets, you don’t have to load files into Renamer to edit their filenames.
Renamer will save your transformation workflow as a preset so you don’t have to input all those functions every time you want to rename a file. This is especially useful as you can set up Renamer to batch rename several files using a complicated workflow and then reuse a saved preset to rename a single, similar file days later without going to all the trouble of figuring out the date and everything else by hand. The numbering may be off for a file renamed days later, though, so you’ll want to keep an eye on that.
To save a preset, click the drop-down to the left of the gear in the upper right, and select Save Preset As. Choose a name for your preset and click Save. You can rename or delete a preset by selecting Edit Presets. Load a preset by clicking the presets drop-down again and looking all the way to the bottom of the menu; they should be listed there.
With saved presets, you don’t have to load files into Renamer to edit their filenames. I know it sounds crazy, but just hold on. With Renamer running, select your files in Finder, then click the Renamer menubar icon. Choose the preset you want to use to batch rename your files, and bam! You’re done!

Automator

You can customize your workflow in Automator so that your have a renaming process that is exactly what you want.
While not as flashy as the other methods we’ve tried, and quite a bit more labor intensive, creating an Automator workflow to batch rename your files can have its benefits as well. Besides being free, you can customize your workflow so that your have a renaming process that is exactly what you want. Beyond just renaming, you can add labels to your files, move them to another folder, add Spotlight comments, and more.

Step 1: Open a New Automator Workflow

Open Automator, located in your Applications folder. On launch, you’ll be prompted to choose what kind of workflow you want to create. Select Application, because our workflow is going to run all on its own. We’re going to create a renaming application; you’ll be able to drag one or one hundred files onto its icon, and it will rename all of them.

Step 2: Find the Rename Action

With Actions selected, type “Rename Finder Items” into the search field. Select the action, and drag it into the main workflow pane. You’ll be prompted to choose whether you want Finder to copy all items being renamed to a new location before the transformation begins. I selected Don’t Add, but it’s up to you. If you choose to add the Copy Finder Items process, you must select a destination for the new files or your application won’t work.
Choose whether to create a Copy Finder Items action.
Choose whether to create a Copy Finder Items action.

Step 3: Create Your New Filenames

The Rename action will default to Add Date or Time, but you can change that by clicking the drop-down and selection whatever you’d like, including Add Text, Make Sequential, and Replace Text. Edit the parameters of the action to get your filename just how you want it.
If you’d like to apply two or more transformations is a single workflow, just drag the rename action into the workflow pane again.
Just because the rename action only allows you to perform one transformation doesn’t mean you have to choose among adding a date to your filenames, replacing text, adding sequential number, or any of the others. If you’d like to apply two or more transformations is a single workflow, just drag the rename action into the workflow pane again. You can do this as many times as you’d like until you get your filename just right.
You can add as many rename actions into your workflow as you'd like.
You can add as many rename actions into your workflow as you'd like.
Remember that you will be asked whether you want to add an action to copy your files each time you add the rename action. Even if you do want the copy files action, you’ll only need it once, at the beginning of the workflow. If you accidentally add it again further down, don’t sweat it. Just click the "X" in the upper right of the actions title bar to remove it.
Advertisement

Step 4: Customize Your Filenames

Automator is great, because it can do just about anything, all in one workflow. You needn’t feel tied to just renaming files in your batch renaming workflow. For instance, if you want to also move the renamed files to a specific folder, search for Move Finder Items. Before you move your files, though, you might want to make sure they stand out in their new location, so try searching for Label Finder Items. When you're done, save your new application to somewhere easily accessible, like your Desktop. When you're ready to use it, just drag the files to be renamed onto your new application's icon.
There's no reason to stop at renaming your files. You can do a lot more if you poke around Automator.
There's no reason to stop at renaming your files. You can do a lot more if you poke around Automator.
The possibilities are nearly endless with Automator, and you can create a renaming application that does just what you want it to do. The downside is that the more specific you get with your workflow, the fewer uses you’ll find for your application. Of course, you could create a few very detailed applications to do the heavy lifting on batch renaming operations you do rarely and one or two more general workflows to handle everyday renaming. How you use Automator and your workflows is entirely up to you!

Final Thoughts

Batch file renaming doesn’t come easy to the Mac, but we looked at three ways you can get this time-saving function done a lot easier than editing all your files one at a time. NameChanger is a great free application that will do lots of batch renaming functions, and for $10, Renamer will go the extra mile and allow you to create saved workflows. If you prefer to do it yourself, though, Automator may be the way to go, and while each individual Automator workflow will be limited in what it can do, you can customize as many workflows as you’d like to meet all your needs.
There are many more batch renaming applications out there, and lots more ways to put Automator to work, too. How have you been getting batch renames accomplished? Let us know in the comments!

Unknown

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation.

 

Copyright @ 2013 KrobKnea.

Designed by Next Learn | My partner