This post was updated on June 25th, 2020
Learning Adobe ® Lightroom
Last time we had a look at the Detail Panel in the Develop Module. While we haven’t finished exploring the Develop Module, I thought we should figure out how to export our photos. Therefore we are exploring how renaming files in Adobe ® Lightroom with the help of the template editor works, in this article as a preparation. This approach saves the step of re-establishing the link between the filename and the file location Lightroom stores later, yet it comes with some challenges of its own. Early next year, we start working our way through the export window and figure out how to restore lost connections Adobe ® Lightroom before we return to the Develop Module.
- Why do you want to rename your imported files from within Lightroom?
- Renaming files in Adobe ® Lightroom’s Library Module
- Potential Problems
- Ensuring the selection of Master files
- Avoiding Spaces when renaming files in Adobe ® Lightroom
- The renaming files dialog
- File Naming
- Creating file naming presets in the Filename Template Editor
- Preset list
- Example box
- Image Name
- Sequence and Date
- Where are these templates stored?
Why do you want to rename your imported files from within Lightroom?
As you might remember from the introduction article, Adobe ® Lightroom does not store your actual photo file. It only creates an entry in its database to note the name of the file and where it is located.
If you rename a file directly on your hard drive, your Lightroom database is not updated. Therefore your Lightroom catalog will no longer be able to locate the file and mark it as missing.
As long as you do permanently delete your file, you can, however, restore the connection in Adobe ® Lightroom. We explore this in detail in a later article.
To avoid restoring all database entries manually, the recommendation is to do the renaming directly in Adobe ® Lightroom, as this automatically takes care of the necessary database updates.
Let’s have a look at the details.
Renaming files in Adobe ® Lightroom’s Library Module
Renaming files in Adobe ® Lightroom means that updates of filenames happen in two places.
- Adobe ® Lightroom updates the internal database entry which holds the filename and location with the new name.
- It updates the physical file on the hard drive with the new name.
If you select a file with virtual copies in Adobe ® Lightroom, these are automatically updated as well.
However, if you select a virtual copy and rename it, you rename the physical file and the virtual copy. Do you see what is missing here?
Yes. The original file in the Lightroom catalog keeps its original name. Now you have a physical file with a new name and a link in the Lightroom catalog to a file with the old name that does no longer exist. Therefore Adobe ® Lightroom now marks the original file as missing.
So my advice is to execute the file renaming with caution. Either do it first when you are exporting your files or before you create virtual copies. If you cannot avoid renaming of photos that have virtual copies attached you need to ensure that you select only the Master files.
Ensuring the selection of Master files
In the Library Module’s Menu open Library, check to Enable Filters.
Then select Filter by Kind -> Master Photos like in the following screenshots.
This filter is only active in the collection or folder that you selected before enabling the filter.
If Master Photos is greyed out in your selection list, the folder/collection that you have opened does not contain any original photos.
Avoiding Spaces when renaming files in Adobe ® Lightroom
Since it can be problematic for some programs to open files that include spaces in their filenames, you should set a replacement character in your Lightroom preferences. Go to Preferences -> File Handling -> File Name Generation (bottom box) -> When a file name has
This way, you can use the title field, for example, in your filename and avoid problems later on.
The renaming files dialog
Selected the files in your Adobe ® Lightroom catalog’s Library Module that you want to rename and either press <F2> or choose Library -> Rename Photo… from the menu. The following window opens:
As you can see, you get a selection list to choose the type of file renaming, and in this case a couple of greyed out fields as well as a Cancel and an OK button. If you can use the fields Custom Text and/or Start Number depends on the settings that you made in your file naming selection. Let’s explore that next.
Clicking on the selection list opens it. You see a selection of presets for different ways of using parameters to rename your file. Some of these are implemented by your Adobe ® Lightroom installation. Some in the figure below, I have created according to my own needs.
So here you can choose a template for the renaming of your file(s), or you can create one to your needs.
Of course, if you are satisfied with one of the templates from the selection list, you can choose it by clicking on it, otherwise chose Edit.
Let us assume that you are satisfied with one of the presets from the list, and you have selected it. If it uses either a custom text or a sequential numbering, the appropriate field becomes accessible.
In the example below, I choose the standard preset Custom Name – Sequence:
As you can see, I can now enter text into the Custom Text field, and a number between 1 and 100.000.000, where the last value used is pre-entered.
However, of course, you might need something different. Maybe, you would like to name your photos by the title field and the date when you took them? Alternatively, you want to use some Geographical information in your file names? Let’s have a look at how to create your own presets for file naming next.
Creating file naming presets in the Filename Template Editor
Instead of selecting one of the predefined presets, click on the Edit… choice in the selection list below.
This opens the Filename Template Editor that helps you to specify your preset to rename your file.
Let’s examine the editor section by section.
This opens a list of all your file naming presets in your system.
Notice that the currently active preset is checked with a √-symbol.
Furthermore, you see four choices:
- Save Current Settings as a New Preset…
So you make some adjustments to an existing preset and store it under a new name.
- Restore Default Presets
Restores the settings of the renaming presets, and deleted renaming presets to the state of delivery by Adobe ® Lightroom
- Delete Preset <Name of the currently selected one>…
As the name suggests, it deletes the currently selected preset. You get a warning that you have to confirm to proceed. If you are deleting a preset created by Adobe, you still have the restore option though. Otherwise, you would need to have the template file in a backup.
- Rename Preset <Name of the currently selected one>…
Gives the template a new name.
If you already have made any changes to your preset, by using the other sections, you do not see Delete Preset or Rename Preset. However, you have the option to Update your current preset with the setting that you’ve applied.
Not only are you going to use this box to assemble your different fields for your filename template, but you can also add text by clicking into the box and writing.
On top of the box, you can see one example of how a final filename with the template applied is going to look.
Do you notice the little downward arrow in the light blue boxes of the Example box? If you click on these, you open the selection again and can adjust your choice. Say, you choose a date format of YY but wanted to choose YYYY, you can easily change it here now.
In this block, you have two selection lists, which both give you access to different templates of filenames.
The first selection list includes:
- Filename – your current filename
- Filename number suffix – the number suffix of your file’s name. For example, if your file name is IMG_9967.dng, the file name number suffix would be 9967.
- Folder name – the folder in which your file is. If your file is in a subfolder, it is the last folder’s name that is given here and not the entire structure. So for example, if the path to your file is Pictures/2019/November/RAW the Folder name used here would be RAW.
The second selection list includes:
- Original filename – the filename under which you imported your file into Adobe ® Lightroom
- Original number suffix — the file number suffix of the original filename (if it had one) under which you imported it into Adobe ® Lightroom.
- Copy name — The value of the copy name field, as shown in the Metadata Panel’s Location Data.
- Preserved filename
To add any of these to your template, select them and then click the Insert button on the right side of the appropriate list.
Sequence and Date
Again you can choose from two different selection lists. The first one includes all kind of available sequence numbers; the second includes date and time formats.
- Sequences: Allow you to specify a start value in the Renaming window for each usage of the template.
- Image: An automatic counter of the number of images included in the renaming process, a start value cannot be specified.
- Total: The total number of images included in the renaming process, you cannot specify a start value for this field. If you combine it with Image from above, you could rename your file to something like 001of010.jpeg to indicate that it is the first of ten JPEG files. If you were to rename only a single file, its name is 001of001.jpeg even though many more exist.
All three options come with five formatting options for the number of leading 0, from none to four. Leading 0 help you keep the alphabetical order of your files on your hard drive, as a file named 2.jpeg alphabetically comes after 10.jpeg on a computer, so naming it 02.jpeg instead would fix the order.
The date and time are always based on the date and time when the photo was created (Date Time Original from the EXIF data). Not from the timestamp of when you are performing the renaming operation.
- Date (Month DD, YYYY): writes the full name of the month in the language that you have chosen for operating system followed by the day and the year in four digits. Like this: November 6, 2019
- Date (YYYYMMDD): Writes the date as a short form as year month day like this: 20191106.
- Date (YYYY): Writes only the four digits of the year like this: 2019
- Date (YY): Writes only the last two digits of the year, 2019 is written as 19.
- Date (Month): Writes the full name of the month in your operating system’s language.
- Date (Mon): Writes the short name of the month in your operating system’s language, for example, Nov instead of November.
- Date (MM): Writes the numeric representation of the month, for example, 11 instead of November.
- Date (DD): Writes the number of the day.
- Julian Day of the Year: Number of the day according to the Julian calendar.
- Hour: Hour in 24-hour-format.
This block offers inserts for all kinds of metadata, from titles and captions over to copyright information and location data to keywords and exposure information.
Custom Text – clicking on Insert here adds a Custom Text block to the Example block, which activates the Custom Text field in the Rename Window.
Once you have made all the adjustments to the template that you need, save it as a new preset by choosing Save as a new preset from the Preset list. Alternatively, apply it directly by clicking OK without saving.
The Filename Template Editor closes, and you can apply your settings to your selected files by clicking OK. Adobe ® Lightroom closes the Renaming Window and shows – at least if you are trying to rename multiple files – a progress bar in the upper left corner.
Where are these templates stored?
On a Mac these templates are stored in /Library/Adobe/Lightroom/Filename Templates/<filename_template.lrtemplate>.
On a Windows machine they are stored in \Users\<user name>\Library\Application Support\Adobe\Lightroom\Filename Templates\<filename_template.lrtemplate>.
You should add this, and all directories under Lightroom actually, to your backup system. This way, should you ever lose your hard drive, you can recreate your presets and templates for Lightroom after reinstalling the software.
Also, if you ever get a new computer, it would make sense to copy these directories to the new machine to preserve your presets and templates. Unless of course, you decide that you do want to start from scratch or do not want to work with Adobe ® Lightroom again.
All trademarks and copyrighted items mentioned are the property of their respective owners.
I am in no way affiliated with any of the products used in this post-processing process. I do not receive any kind of compensation for this article, it was neither offered or asked for.
THIS BLOG ARTICLE “Renaming files in Adobe ® Lightroom’s Library Module” IS NOT AUTHORIZED, ENDORSED OR SPONSORED BY ADOBE SYSTEMS INCORPORATED, PUBLISHER OF ADOBE ® LIGHTROOM