Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Sorting by filename is not working properly

Explorer ,
Sep 26, 2025 Sep 26, 2025

I can't seem to get my files sorted by filename. For example, I have 100 photos named MAY_1000.NEF through MAY_1100.NEF. For a select few, I run the files through Topaz Denoise, which renames that group MAY_1035-Edit.JPG, etc. When I try to sort the files by name, Lightroom puts the "edit" group at the end of the original files, instead of  adjacent to them. Shouldn't LR sort them like: MAY_1034.NEF, MAY_1035.NEF, MAY_1035-Edit.JPG, MAY_1036.NEF....?

 

In other words, I'd like to sort by the first 8 characters rather than the randomized sort the LR currently does.

 

Thanks,

Jeff Hall - North Carolina

TOPICS
Windows
270
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Sep 27, 2025 Sep 27, 2025

Based on the shades of the grey backgrounds surrounding the thumbnails, it appears you've put a large number of the photos in that folder into a stack, and the stack is expanded.  For comparison, this screenshot shows the first three thumbnails not in a stack, the next 10 in a stack (expanded), and the next 7 not in a stack:

 

johnrellis_0-1759018959331.png

 

To verify, do the menu command Photo > Stacking > Collapse All Stacks, and now you'll see just the tops of one or more stacks.

 

In Grid view, a stack appears in the sort ord

...
Translate
Adobe Employee ,
Sep 26, 2025 Sep 26, 2025

Hi @desono5000000, Lightroom sorts filenames alphanumerically, character by character. Symbols like hyphens (-) come after letters and numbers in ASCII order, so MAY_1035-Edit.JPG will sort after MAY_1100.NEF, not next to MAY_1035.NEF. The hyphen causes Lightroom to place them later in the list. ^CH

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

I’ve tried removing the hyphens from a filename, but when I sort by filename, the target file does not move. It’s almost like LR sorts by file extension, then by filename. I had to go through 180 files, 10 at a time to be able to compare different versions of my latest batch of files. I also tried renaming the errant file as simply MAY_1035a.jpg, but it doesn’t move to where the other versions of that file are found. In the example below, I am in filename sorting, but the two versions of each file are nowhere near each other… Very frustrating.

 

desono5000000_0-1758991177806.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

P.S. here's how Windows Explorer parses similar filenames, yet keeps them all together with the original. 

desono5000000_0-1758991270239.png

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2025 Sep 27, 2025

Perhpas you want to sort by Capture Time instead of filename.Your screen capture of Lightroom Classic isn't particularly useful since we can't see the file names.

 

In addition, your screen capture of Windows Explorer does not indicate if these are sorted by name or by the creation date of the file.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 28, 2025 Sep 28, 2025
LATEST

Not sure this is correct, as after removing "stacks", my files sort by similar filenames regardless of hyphens or not.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2025 Sep 27, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

@desono5000000: "Shouldn't LR sort them like: MAY_1034.NEF, MAY_1035.NEF, MAY_1035-Edit.JPG, MAY_1036.NEF....?"

 

Windows LR normally sorts the file names in that order:

 

johnrellis_3-1759000294374.png

 

This is the same order as in Windows File Explorer:

 

  johnrellis_2-1758999969880.png

 

(Note that Mac LR and Mac Finder put MAY_1035-Edit.JPG before MAY_1035.NEF.)

 

If you're seeing something different, then:

 

1. Do View > Options > Grid View and change Compact Cell Extras to show File Name on top of the thumbnail. Then change Show Grid Extras to Compact Cells:

johnrellis_4-1759000588479.png

 

2. Post a full-resolution screenshot of the entire LR window in Grid view, including the left column showing the currently selected Collection or Folder.

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

Here's the screen after doing what you asked for. I've circled in red two of the files with the same first 8 characters: 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

By the way, sorting by capture time does not help either. Here's what I seen when sorting the same files by capture time: 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

And here's the time/date display for the two files that don't stay together. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2025 Sep 27, 2025

Please use the Insert Photos icon to include your screen captures in your reply, as you did earlier. You have included your screen captures as file attachments, and I cannot open or view anyone's file attachments.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

lrbug5.jpglrbug4.jpgLRbug3.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

lrbug4.jpglrbug4.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 27, 2025 Sep 27, 2025

To make things more visible I filtered down to just files beginning with s9z_176. The file order makes no sense at all given that it should be sorted by file name. lrbug7.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 27, 2025 Sep 27, 2025

Based on the shades of the grey backgrounds surrounding the thumbnails, it appears you've put a large number of the photos in that folder into a stack, and the stack is expanded.  For comparison, this screenshot shows the first three thumbnails not in a stack, the next 10 in a stack (expanded), and the next 7 not in a stack:

 

johnrellis_0-1759018959331.png

 

To verify, do the menu command Photo > Stacking > Collapse All Stacks, and now you'll see just the tops of one or more stacks.

 

In Grid view, a stack appears in the sort order according to the top photo in the stack. All the other photos in an explanded stack appear in the order in which they were placed in the stack, regardless of Grid view's current sort order.

 

Use the menu commands in Photo > Stacking to decide which of the photos (or all of them) you want to remove from the stacks.

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 28, 2025 Sep 28, 2025

lrfix001.jpgBEAUTIFUL! That worked! Thank you! Now all I need to know is how these all got stacked? Does stacking occur when selected photos get ratings or color tags? Best, Jeff

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 28, 2025 Sep 28, 2025

"how these all got stacked? Does stacking occur when selected photos get ratings or color tags?"

 

Applying tags or ratings won't stack photos.  Perhaps you accidentally typed the keyboard shortcut for Photo > Stacking > Group Into Stack (Ctrl G) when the photos were selected.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 28, 2025 Sep 28, 2025

Very possible I hit Ctrl G instead of just G at some time. Now I have fixed it per your suggestion, and changed all the other relevant options to keep it fixed. Really appreciate your help John!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Sep 28, 2025 Sep 28, 2025

I have import set to import into one folder. For specific events/places I import into a folder with a name like "Huntington Beach", but for general shots I import into folders with month/year name that I make. The issue I was having was due to files being somehow automatically stacked. Once I unstacked them, the mis-ordering went away. 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines