6 Methods to Batch Rename Recordsdata on Mac

Renaming a bunch of information directly could be difficult. Fortunately, MacBooks have built-in instruments, like Automator and AppleScript, that permit you to simply rename a number of information in a batch. Alternatively, you possibly can obtain third-party apps to batch-rename information in your Mac, and on this information, we check out each choices.

1. Utilizing Finder

You should use Finder to batch rename information on Mac. Word that the strategy solely provides prefixes/suffixes and never full file names. However you possibly can nonetheless do lots, like changing phrases in batches or altering codecs. Comply with the steps beneath to vary file names utilizing Finder.

Good to know: in search of the perfect Finder settings? We may help you out.

  1. Find the information you need to rename inside Finder.
  1. Choose the entire information you want to rename.
Select All The Files You Wish To Rename
  1. Click on the three dots within the high proper of the Finder window. Choose “Rename” from the drop-down menu.
Click Three Dots In The Top Right And Select Rename From The Drop Down Menu
  1. Click on the “Change textual content” drop-down menu within the pop-up.
Click The Replace Text Drop Down Menu
  1. Select “Add Textual content” from the drop-down menu. Kind the phrases or characters that you simply need to exchange the file names, then choose whether or not you need to insert them earlier than or after the present identify within the adjoining drop-down menu.
Choose Add Text Type The Words To Replace The File Names And Select Before Or After Name
  1. Click on “Rename” to vary file names.
Select Rename To Change File Names 1

2. Utilizing Automator

Automator is a built-in app in macOS that’s designed for automating repetitive duties. The app permits you to assemble related duties into batches, equivalent to batch rename information, however there are tons of of different Mac choices to select from within the Automator Library. Comply with the steps listed beneath to make use of the batch rename choice.

  1. Launch Finder and choose “Functions” within the left sidebar.
Launch Finder And Select Applications In The Left Sidebar
  1. Discover and click on “Automator.”
Find And Click Automator
  1. Click on on “New Doc” within the backside left of the brand new window.
Select New Document At The Bottom Left Of The New Window
  1. Within the pop-up window, click on on “Workflow,” then “Select.”
Click Workflow And Select Choose In The Pop Up Window
  1. Choose “Library” from the left sidebar within the new doc.
Select Library From The Left Sidebar In The New Document
  1. Click on “Recordsdata & Folders” to entry the checklist of the entire information contained in the Automator Library.
Click Files And Folders To Access All The Files Inside The Automator Library
  1. Discover and double-click the “Get Specified Finder Objects” folder. Alternatively, drag and drop the folder to the workflow pane.
Drag And Drop Your Files
  1. Double-click or drag and drop the “Rename Finder Objects” folder to the workflow pane. In the event you drag the folder, drop it beneath the “Get Specified Finder Objects” folder.
  1. If a dialog field seems warning in regards to the modifications made to the names of the Finder objects, choose the “Don’t Add” button.
Click Do Not Add
  1. Click on “Choices” situated above the “Get Specified Finder Objects” field.
Click Options Located Below The Get Specified Finder Items Box
  1. Three choices will seem below Choices. Test the field subsequent to “Present this motion when the workflow runs.”
Check The Box Next To Show This Action When The Workflow Runs
  1. Go to the “Rename Finder Objects” choice and choose the drop-down menu that claims “Add Date or Time.”
Click Add Date Or Time
  1. Click on “Make Sequential” within the menu.
Check The Box Next To Show This Action When The Workflow Runs Under Options
  1. Discover and verify the “new identify” choice beside “Add quantity to present merchandise identify.”
Add New Name
  1. Go to “Choices” within the backside left of the “Rename Finder Objects” part.
Go To Options Under The Rename Finder Items Section
  1. Test the field subsequent to “Present this motion when the workflow runs.”
Click Show This Action When Workflow Runs
  1. Click on “Add” so as to add the batch of information you want to rename.
Click Add To Add The File Batch You Wish To Rename
  1. Choose the batch of information and click on “Add.”
Select The File Batch And Click Add
  1. Add the identify you need to use to rename the batch of information.
Write The Name You Want To Use For Renaming Batch Files
  1. You’ll be able to modify the naming settings to your preferences. You will note how the identify will look within the “Instance” discipline.
Adjust The Rename Settings By Changing The Place Number And Separated By
  1. The workflow is full. Choose the “Run” button within the top-right nook.
Select The Run Button At The Top Right Corner
  1. A dialog field will open. Click on on “Proceed.”
Click Continue In The Dialog Box That Opens
  1. One other dialog field will seem displaying the renaming settings. Click on “Proceed” to proceed.
Click Continue To Proceed On The Rename Finder Items Dialog Box
  1. The workflow will begin operating, and the entire chosen folders will probably be renamed.
Renamed Files

3. Utilizing AppleScript

AppleScript is one other helpful macOS built-in instrument to batch rename information and folders. It’s a scripting language that may assist automate duties utilizing the preinstalled Script Editor in your Mac. Comply with the steps beneath to make use of it:

  1. Navigate to “Functions -> Utilities folder” and launch “Script Editor.”
Navigate To Applications Click The Utilities Folder And Launch The Scripteditor
  1. Choose “File” and click on the “New Doc” choice to create a brand new script.
Click File And Select New To Create A New Script
  1. Copy the next code and paste it into the Script Editor window:
--This code is from https://gist.github.com/oliveratgithub/
settext merchandise delimiters to"."
inform software "Finder"
set all_files to each merchandise of (choosefilewithprompt"Select the Recordsdata you’d prefer to rename:"with a number of picks allowed) aslist
show dialog "New file identify:"default reply ""
set new_name totext returned ofresult
--now we begin looping by means of all chosen information. ’index’ is our counter that we initially set to 1 after which depend up with each file.
--the ’index’ quantity is after all required for the sequential renaming of our information!
repeatwithindexfrom1to the countof all_files
--using our index, we choose the suitable file from our checklist
set this_file to merchandise indexof all_files
set {itemName, itemExtension} to {identify, identify extension} of this_file
--if the index quantity is decrease than 10, we'll add a previous "0" for a correct filename sorting later
ifindexislessthan10then
set index_prefix to"0"
else
set index_prefix to""
endif
--
--lets verify if the present file from our checklist (based mostly on index-number) has even any file-extension
if itemExtension is""then
-- "" means there is no such thing as a file-extension current.
set file_extension to""
else
--yup, we're at the moment processing a file that has a file-extension
--we should re-add the unique file-extension after altering the identify of the file!
set file_extension to"." & itemExtension
endif
--let’s rename our file, add the sequential quantity from ’index’ and add the file-extension to it
set the nameof this_file to new_name & index_prefix & index & file_extension asstring
endrepeat
--congratulations for efficiently engaging in the batch renaming job :)
show alert "All performed! Renamed " & index & " information with ’" & new_name & "’ for you. Have an excellent day! :)"
finish inform
  1. Click on on the Hammer icon to compile the script.
Click The Hammer Icon To Compile The Script
  1. Open “File” from the highest toolbar, then click on on the “Save” button to avoid wasting the script.
Click File And Select Save To Save The Script
  1. Click on the Play button within the Script Editor window to run the script.
Click The Play Button In The Scripteditor Window To Run The Script
  1. A brand new window will seem, asking you to pick out the information you need to rename. Navigate to the folder containing these information, choose them, and click on the “Select” button.
Navigate To The Folder Containing Files Select Them And Click Choose
  1. One other dialog field will seem, asking you to enter the brand new identify for the information. Enter the brand new identify and click on “OK.”
Enter The New Name And Click Ok
  1. The script will run and rename the entire information within the chosen folder with the brand new identify. The information may even be given a quantity suffix to make sure they’re distinctive. You’ll obtain a affirmation message when the renaming is full.
Batch Files Renaming Confirmation Message
  1. Shut the Script Editor window.
  2. Test the folder to verify that the information have been renamed.
Renamed Batch Files In A Folder

Word: the script will rename the entire information within the chosen folder however won’t change the file extension, even in case you specify a file extension within the pop-up window.

If you wish to modify the file extension, use the code beneath and compile it within the Script Editor the identical manner the code was compiled above.

settext merchandise delimiters to"."
inform software "Finder"
set all_files to each merchandise of (choosefilewithprompt"Select the Recordsdata you’d prefer to rename:"with a number of picks allowed) aslist
show dialog "New file identify:"default reply ""
set new_name totext returned ofresult
show dialog "New file extension:"default reply ""
set new_extension totext returned ofresult
--now we begin looping by means of all chosen information. ’index’ is our counter that we initially set to 1 after which depend up with each file.
--the ’index’ quantity is after all required for the sequential renaming of our information!
repeatwithindexfrom1to the countof all_files
--using our index, we choose the suitable file from our checklist
set this_file to merchandise indexof all_files
set {itemName, itemExtension} to {identify, identify extension} of this_file
--if the index quantity is decrease than 10, we'll add a previous "0" for a correct filename sorting later
ifindexislessthan10then
set index_prefix to"0"
else
set index_prefix to""
endif
--
--lets verify if the present file from our checklist (based mostly on index-number) has even any file-extension
if new_extension is""then
-- "" means there is no such thing as a file-extension current.
set file_extension to""
else
--yup, we're at the moment processing a file that has a file-extension
--we should re-add the unique file-extension after altering the identify of the file!
set file_extension to"." & new_extension
endif
--let’s rename our file, add the sequential quantity from ’index’ and add the file-extension to it
set the nameof this_file to new_name & index_prefix & index & file_extension asstring
endrepeat
--congratulations for efficiently engaging in the batch renaming job :)
show alert "All performed! Renamed " & index & " information with ’" & new_name & "’ and file extension ’" & new_extension & "’ for you. Have an excellent day! :)"
finish inform

While you run this script, you’ll get a brand new choice to pick out the brand new file extension for the information you need to rename. Add your required file sort and click on “OK.”

Set Your Desired File Type And Click Ok

You’ll get a affirmation message stating that your information have been renamed and the file sort has been modified to the one you specified. You’ll be able to verify your folder to confirm that.

Batch Files Renamed With Specified File Type Confirmation Message

4. NameChanger

NameChanger is a free, easy, and easy-to-use file rename app. You’ll be able to simply obtain the app and batch rename information and folders in your Mac. To try this, drag and drop the required information onto the app.

Namechanger Mrr Software Batch File Renamer For Mac

There are numerous choices to vary the file names, together with:

  • Change First Incidence
  • Change Final Incidence
  • Change All Occurrences
  • Wildcard
  • Append
  • Prepend
  • Date

The very best factor about NameChanger is that it immediately exhibits the modifications made with out renaming the information. After coming into the information within the textual content fields, click on the “Rename” button to vary the information’ names.

The best way to Use NameChanger

To batch-rename information utilizing NameChanger, first obtain the app and open it, then begin renaming information as proven beneath:

  1. Select the information you need to rename and drag and drop them to the left sidebar within the app. Alternatively, choose the “Add” button so as to add information to the app.
Select The Add Button To Add Files To The App
  1. Click on the drop-down menu to entry totally different renaming options. Choose the specified choice.
Click The Dropdown Menu Of Replace First Occurrence With
  1. Relying in your chosen choice, a pop-up window will seem with a number of choices. For example, the “Sequence” choice permits you to embody the variety of digits within the file identify, location, and association fashion for information.
Edit The Renaming Details In The Pop Up Window
  1. Click on the “Rename” button to vary the identify of all added information.
Click The Rename Button To Change The Name Of All The Added Files

5. Renamer 6

Renamer 6 is one other third-party file-changing app that permits you to shortly rename information and folders. It affords a number of methods to vary file names, which is a good function if a selected methodology doesn’t work for chosen information or folders.

Renamer Batch File Renamer For Mac

Listed here are a number of the different distinctive options of this batch file renaming app:

  • Organizes your renaming duties into Renamerlets
  • Skill to create numerous assembling chains for complicated file-renaming duties
  • Exhibits a stay preview of the brand new identify
  • Skill to undo and again up your information with out worrying about dropping knowledge

6. Good File Renamer

Smart File Renamer For Mac

This third-party file renaming app is superb for altering a number of media names. Beside information and folders, the Good File Renamer helps audio, pictures, file tags, and plenty of extra file sorts. With good filters and customized guidelines, you possibly can shortly rename your information with out manually including the information.

Keep in mind, you should utilize the free model of the app, nevertheless it doesn’t provide limitless renaming. It’s essential to purchase the premium model to entry the limitless renaming function.

Often Requested Questions

Can I take advantage of Automator or AppleScript to rename information solely in a selected folder?

Sure. Choose the information throughout the desired folder to rename them in each Automator and AppleScript.

Can I undo a batch renaming course of if I made a mistake?

Sure, as most third-party apps have an undo function. In the event you’ve made a mistake within the new identify, you possibly can shortly undo it and rename the information once more.

How can I add particular textual content or numbers to the start or finish of a batch of file names?

You’ll be able to add particular textual content or numbers to the start or finish of a batch by coming into the required characters within the specific textual content or quantity fields. Each built-in and third-party apps have fields particular to totally different textual content or numbers, which you should utilize to rename your information.

Can I rename information with totally different extensions in a single batch renaming course of?

Sure, you possibly can rename information with totally different extensions in a single batch. Since no further step is required whereas renaming batch information with totally different extensions, every file will probably be renamed no matter its extension.

Is there a restrict to the variety of information I can rename directly utilizing Automator or AppleScript?

No, Automator and AppleScript don’t restrict the variety of information you possibly can rename directly. Nevertheless, you should make sure the workflow or code is written appropriately.

Can I take advantage of a third-party app to rename information on my Home windows laptop as nicely?

Is there any threat of knowledge loss whereas renaming information in batch?

The identify of the information and the information they include are impartial of one another. Renaming batch information shouldn’t threat knowledge loss. Nevertheless, it’s possible you’ll lose knowledge by renaming information if delicate information is encoded into their names. Since renaming modifications the file identify, it’s possible you’ll lose knowledge embedded into the file identify.

Picture credit score: Unsplash. All screenshots by Ojash Yadav.