Tuesday, July 27, 2021
All countries COVID-19 Cases
195,901,106
Total confirmed cases
Updated on July 27, 2021 10:24 PM

How to batch rename files in macOS

Must Read
- Advertisement -
Writer

If you have multiple files to collect in the same folder, but want to title them in a neater way, you must learn to master file renaming in macOS.

Sometimes if you are putting together a collection of documents and files for someone else, or for safekeeping, you will find that the names of the documents are not entirely suitable for the task. This is especially the case when you extract files from multiple sources into a single folder.

Enthusiastic photographers will be familiar with a series of files titled something like “DSC_2318.JPG” or similar, which will not tell you what the images are unless you look at the contents of the file, or have had the foresight to give the one containing the image. folder a good name. This doesn’t help if you have to share those files later on, as the recipient will have the same problem.

What you need to do is rename or edit the file names to make them more readable. Although you can do that for individual files, Apple actually includes a large dialog box for renaming multiple files at once.

Rename a file

It’s trivial to change the name of a document in macOS in the Finder.

How to rename a single file in Finder on macOS

  • Click the file name twice, but with a long space between the two clicks. This will make the file name editable. Rename, soon click elsewhere to end.
  • Alternatively, the right button of the mouse the file and select Rename. Edit the name, soon click elsewhere to end.
  • OR, Please select the file, then click File soon Rename on the menu. Edit the name, soon click elsewhere to end.

The Rename option is just a right click away.

Things are simple when it comes to a single file, but when you have to deal with numerous files, this method will not be fast. However, it will allow you to name files uniquely.

Rename multiple files in batch

Dealing with multiple files isn’t vastly different from renaming a single file to begin with, but it quickly becomes a more complex task once it’s started.

How to batch rename multiple files in Finder on macOS

  • Inside a Finder window, Please select the files you want to rename. You can drag the cursor to select multiple with a box, or Shift-click or Command-click files, or from the menu, select Edit soon Select all.
  • With the selected files, the right button of the mouse selected files and select Rename, or go to File soon Rename on the menu.
  • Use the dialog box to rename your files.
  • Once completed, click Rename.

When you click Rename, all selected files will be renamed according to the settings within the Rename Finder Items dialog box.

Configuration options

The Rename Finder Items pop-up window offers you a few ways to rename the files you have selected. Rather than explicitly naming each file, you are giving macOS a set of rules to rename all of them.

Generally speaking, there are three categories of renaming that you can use: Replace Text, Add Text, and Format.

Replace text

This option is fairly straightforward, as it is similar to the “Find and Replace” tools that you may have used for text documents. Here, it is used for the text string which is the name of the file.

You have two text boxes to fill in, with the Find box covering the text string you want to replace and the Replace with box for what you want to put there.

The Replace Text option allows you to change parts of a file name.

The Replace Text option allows you to change parts of a file name.

This can be really useful as an option when you have a lot of files with similar names, but you want to change one prefix, suffix, or word to another. Leaving the Replace with box empty will delete the text string instead of replacing it.

For example, if you have the file name “DSC_2454.JPG” in the list and you set Find to “DSC” and Replace with to “Photo”, you will change the file name to “Photo_2454.JPG. Leave Replace with empty and it becomes in “_2454.JPG” instead.

For photographers, this is a great way to give meaning to a batch of files, while preserving the file numbering implemented by the camera. This is also useful for modifying the format, such as changing instances from “INVOICE” to “Invoice” or shortening “December” to “DEC”.

Add text

Instead of changing elements of the file name, Add Text inserts more into the file name. Specifically, you have options to add a text string before or after the file name, which can be selected using the drop-down box on the far right.

Add Text allows you to add a string before or after the existing file name.

Add Text allows you to add a string before or after the existing file name.

For example, if the text box contains “Holidays-” and is set “before the name”, that same photo file name would become “Holidays-DSC_2454.JPG” or after the name, “DSC_2454-Holiday.JPG “. You can include spaces, a dash, or other punctuation to separate the added text from the file name, if desired.

This is useful as it is arguably the least destructive way to handle filenames, as it ultimately keeps the original filename intact. If you want to revert a batch of files with similar names later, you can use the Replace Text version to remove the added item.

Format

Arguably the nuclear option, this will completely erase the file names and instead give you free rein to put your own, without worrying about what the files were previously named.

You have four items to control in this case, and the name format is possibly the most important. It offers you three options, covering Name and Index, Name and Counter, or Name and Date.

The name and index, as well as the name and counter, will combine the text that you include in the custom format field with a counter that will count up. The starting numbers in the box will dictate the first number, while subsequent files will be incremented by one more each time.

The format allows you to choose a descriptive text string and add a counter, or today's date and time.

The format allows you to choose a descriptive text string and add a counter, or today’s date and time.

The difference between Index and Counter lies in how the numeric element is formatted. For the index, the number will be the integer by itself, without any prefix.

For Counter, the number is the integer represented in a five-digit string, ranging from 00000 to 99999. As the integer increases, it will continue to format the number to occupy five digits.

The exception to this rule is if you start the counter at a number greater than 99,999. In such cases, the counter will be lengthened to match.

The main benefit of using Counter instead of Index is if you want to preserve the order of files when users sort files in a folder view. In some file management tools, the name sorting will be sorted by digits as if they were in alphabetical order, rather than as a full number, so a file name with the suffix 2 may appear after another with 10 or 11, for example.

The Where drop-down menu says whether you want the counter before or after the name.

The Name and Date option will rename the file using the current date and time, prefixed or suffixed with custom formatted text. For a large number of files, this will also include a numeric counter, as you cannot assign the same name to multiple files in a folder.

We emphasize that it will show the current date and time, not the creation date of the file itself. This can be confusing for those renaming older files, but it should be appropriate for any new files that you have recently created.

Reversing the name

If you have made a miscalculation in the renaming settings, you can reverse the process by selecting Edit and then Undo Rename from the Menu, or by pressing Command Z. This will mark the most recent change.

Stay up-to-date on all things Apple on the weekly AppleInsider podcast and get a quick update on AppleInsider Daily news. Just say “Hi Siri” to your HomePod mini and request these podcasts and also our latest episode of HomeKit Insider.

If you want an ad-free premier AppleInsider podcast experience, you can support the AppleInsider podcast by subscribing for $ 5 per month via Apple’s Podcasts app, or via Patreon if you prefer any other podcast player.

AppleInsider also brings you the best Apple-related deals for Amazon Prime Day 2021. There are deals before, during and even after Prime Day on June 21 and 22, with all the deals at your fingertips throughout the event.

- Advertisement -

LEAVE A REPLY

Please enter your comment!
Please enter your name here

SUGGESTED NEWS
- Advertisement -
Latest News

Anthem and Humana launch PBM together with hedge funds

Anthem and Humana have entered into a joint venture with private equity and hedge fund manager SS&C Technologies Holdings...
- Advertisement -

More Articles Like This

- Advertisement -