Sometimes a folder contains many files and for sake of proper management renaming all of them in one go is a good choice. It’s surprisingly easy to batch rename multiple files on macOS. Names of files or folders give them a proper recognition and a token of identity related to the content which those folders contain.
Rename single file
Renaming single file or folder on macOS is quite easy. Follow the procedure:
- Open Finder and navigate to the file you want to rename
- Right-click on the file and click Rename in options
- Type the name of your choice and hit enter
That’s it, a similar procedure is for renaming a folder.
Rename multiple files
Renaming multiple files is similar to renaming a single file on macOS. Follow the procedure:
- Open Finder and navigate to a folder which contains multiple-files
- Select the files which you want to rename and then right-click
- In the options, select Rename and a dialogue-box will open
- Rename as per your choice and all the selected files with be renamed
The same procedure stands for renaming multiple folders.
Rename multiple files by replacing certain text
Once you go through rename option for multiple files, you will notice three different options. The first option is Replace text. It finds a certain text in all of the files and then replaces it with the text of your choice. In the Find, write the text which you want to remove and in the Replace with, write the text which you want to add in place of the removed text.
Rename multiple files by appending certain text
Second option is to add certain text to the name of all the files. Once you select this second option, you can give it a text and it’ll be added to the end of the names of the files.
Format file names with date or number sequence
Third option is to change the name of the files with current date and time or numbers in sequence with a certain text for example tow0001, tow0002 etc. Using this option, you can add current date or time which will help you associate all the files with the current day. Additionally, you can also rename all the files in number sequence.
Sequence files by name
In order to sequence files by name, first right-click on the folder and Sort by > Name. Now, all of your files are arranged by name. If you’ll batch rename them and add some sequence number or counting, they will be counted based on their previous names.
Sequence by date of creation
Just like earlier process, simply arrange the files of the folder by date of creation and then batch rename. Follow this:
- Open the folder where files to be renamed are present
- Right-click on the empty space and click Sort by > Date Created
- Select all the files to be batch renamed, right-click and click Rename
- Under format, select Name and Index and click Rename
Sequence by size
Similarly, arrange the files by size and then batch rename them under format using the number sequence. The files will be given index numbers based on their size.
Rename multiple files by Terminal
You can also use terminal to rename multiple files. For this, you need to use rename utility downloadable through Homebrew package utility.
- Open Terminal and use command brew install rename
- The command format of rename is, rename [switches|transforms] [files], hence type rename -a ToW- * and hit enter
- This will append ToW- in the start of all the files in the folder.
If you add -n to the command, then it will show you a preview of the files to be renamed without actually renaming them, for example rename -n -a ToW-* will output:
Transforms options using rename
There are different transformation commands which you can give with rename utility. Simply change the transform flag and then perform the required function.
|Appends a string with file names
|Prepend a string with file names
|Converts all characters to uppercase
|Converts all characters to lowercase
|Replaces every instance of a given character or sets of characters with a given word
|Removed extensions of a file if there is any in the name
Renaming multiple files based on their names, date of creation, size is quite easier than expected on macOS. This not only makes management of multiple files easier but at the same time helps you to organise your laptop space in a better manner. Additionally, you can do this using finder as well as terminal on the macOS.