Skip to main content
Inspiring
August 17, 2021
Question

Unexpected Filename Sort Behavior in LR Classic

  • August 17, 2021
  • 2 replies
  • 683 views

I noticed a sort behavior of Filenames in LrC that is different than what I've seen and what I'm used to in the PC world. I'm attaching a screen shot of the Library module (grid view) and have circled six photos. The camera (Sony a6000) begins filenames with DSC0 (zero). When creating TIF images, notice that I mistakenly dropped the zero. LrC appears to correctly sort the files based on the remaining 4-digit image numbers. (fyi, images with multiple 4-digit numbers are composites.)

Other cameras begin with DSC_ (underscore). Some files begin DSC- (hyphen). It's not a big deal, but the red-circled DSC5 (five) filenames didn't show up where I expected them when I was perusing all of my images in my library, which include underscores and hyphens.

 

Again, not a big deal, but I'm curious: is the expected sort behavior of LrC to presume the filename begins DSC0 (zero) in this situation?

Frank

This topic has been closed for replies.

2 replies

GoldingD
Legend
August 17, 2021

Perhaps a bit of misunderstanding.

 

Is the issue how those TIFF files got the file names

or

Is the issue how they are being sorted?

FrankMazzAuthor
Inspiring
August 17, 2021

How they are being sorted. Again, it's not a big deal, just would be handy to know if Adobe intends Filename sort to act differently than most other (ASCII) sorts.

GoldingD
Legend
August 17, 2021

How were the exports created?

 

  • Edit in Photoshop
  • Edit in third party app (On1, NIK, Luminar, etc)
  • Export 

 

FrankMazzAuthor
Inspiring
August 17, 2021

Photoshop. Probably with "Save As." I don't think it matters how they were created because one of the tif files (DSC5476.tif) I created tonight by Copying in Windows, removing the other 4-digit numbers to see if they are a factor (they aren't).

 

I would just expect all files that begining DSC5... would come after ALL other files beginning DSC0...

Community Expert
August 17, 2021

It depends on the sorting method used.

 

One method interprets filenames strictly character by character, starting from the left.

 

But consider when e.g. a sequence "file1", "file2" ... may continue past "file9".

 

With the strict left-to-right method 10, 11 etc will naturally insert themselves between 1 and 2 - unless a specific length of number field was fixed by padding out with leading zeroes ("file01"), which kicks the can down the road so far as "file99".

 

But by another common method, any number character sequence long or short, gets interpreted as a significant group. Now strict padding out with the right number of zeroes is unnecessary - in fact any leading zeroes which are present, get disregarded for the sort.

 

Hence (say) "DSC52670.jpg", and "DSC0405187.jpg" would sort differently under one scheme, than under the other.

 

On the one hand '5' > '0'; but on the other hand, 405187 > 52670.