Naming image files to sort correctly by Filename

This tutorial is about choosing the right image filename for when you plan to sort your gallery images by Filename. If you are looking for the actual steps on how to sort images by Filename, you can follow the instructions here. At the bottom of this tutorial we also have steps for file naming in Lightroom to automate this process for you.

It can be a touch confusing when sorting by Filename as sort algorithms are generally set up to sort numerically first and then alphabetically.

For example, if you have files named:

  • a.jpg
  • b.jpg
  • c.jpg
  • 1.jpg
  • 2.jpg
  • 3.jpg
  • 10.jpg
  • 11.jpg
  • 12.jpg
  • 21.jpg
  • 31.jpg
  • 41.jpg

When sorting by Filename ascending, it will result in the following order:

  • 1.jpg
  • 10.jpg
  • 11.jpg
  • 12.jpg
  • 2.jpg
  • 21.jpg
  • 3.jpg
  • 31.jpg
  • 41.jpg
  • a.jpg
  • b.jpg
  • c.jpg

To address this, we simply prefix any numbers in the file name with a few zeros and make sure all file names have the same number of digits.

So instead of starting the order from "1", we will use "01" or "001". It all depends on how many images we have.

Examples:

The Sam Portraits gallery has 12 images. The files will be named as:

Sam_01.JPG
Sam_02.JPG
Sam_03.JPG
...
Sam_10.JPG
Sam_11.JPG
Sam_12.JPG

 

The Smith Wedding gallery has 456 images. The files will be named as:

Wedding_Smith_001.JPG
Wedding_Smith_002.JPG
Wedding_Smith_003.JPG
...
Wedding_Smith_010.JPG
Wedding_Smith_011.JPG
Wedding_Smith_012.JPG
...
Wedding_Smith_099.JPG
Wedding_Smith_100.JPG
Wedding_Smith_101.JPG
Wedding_Smith_102.JPG
...
Wedding_Smith_456.JPG

 

 

The Sydney Marathon gallery has 1456 images. The files will be named as:

Sydney_Marathon_0001.JPG
Sydney_Marathon_0002.JPG
Sydney_Marathon_0003.JPG
...
Sydney_Marathon_0010.JPG
Sydney_Marathon_0011.JPG
Sydney_Marathon_0012.JPG
...
Sydney_Marathon_0099.JPG
Sydney_Marathon_0100.JPG
Sydney_Marathon_0101.JPG
Sydney_Marathon_0102.JPG
...
Sydney_Marathon_0999.JPG
Sydney_Marathon_1000.JPG
Sydney_Marathon_1001.JPG
Sydney_Marathon_1002.JPG
...
Sydney_Marathon_1456.JPG

 

File naming in Lightroom

When exporting from Lightroom using our Lightroom Exporter, you can easily achieve this style of naming scheme by following the instructions below. 

1. Tick the Rename To option in the Lightroom Exporter window from the File Naming area.

2. From the drop-down list next to the Rename To option, select the option Edit.

3. Select the preset Filename from the dropdown list at the top of the Filename Template Editor window.

4. In the text box for your Filename Template, add the text " - " next to the placeholder [Filename].

5. From the section Sequence and Date select the option Sequence # (0001) and press the insert button next to it.

6. The Filename Template at the top of the window should now show: [Filename] - [Sequence # 0001]

7. At the top of the window, from the preset dropdown, select Save Current Settings as New Preset...

8. Enter the preset name Filename - Sequence 0001.

9. Press Done.

10. The preset Filename - Sequence 0001 should automatically be selected as the Rename To option.

 

0 Comments

Article is closed for comments.