Lightroom: Batch export still doesn't handle duplicates correctly

  • 1
  • Problem
  • Updated 4 years ago
  • Solved
There have been problems with exporting multiple images where duplicate names exist ever since Lightroom 1. I have raised bugs on each version and while it looks like there has been some improvement, it is still wrong.

With Lightroom 3.4, you can get different results between exporting one image at a time or selecting a number of images and exporting them in one go. The results should be exactly the same.

I use the field "Copy Name" as the file name for exports. The Copy Name for one image may be the same as the Copy Name for another image. I rely on Lightroom to detect a duplicate and present me with the choice to: "Overwrite", "Skip", "Cancel" or "Use Unique Names". Most of the time I choose "Use Unique Names" and Lightroom adds "-2", "-3", etc. as appropriate to the end of the filename before the extension.

The problem is that the way it handles the unique names if different from single exports to batch exports and previously exported files get overwritten.

For example, lets say I already have a file I previously exported which had the copy name of "SydneyOperaHouse_May2011", when it was exported it would be called "SydneyOperaHouse_May2011.jpg". If I was to export another photo in a single export with the same copy name and I chose "Use Unique Names" when prompted, the resulting file would be "SydneyOperaHouse_May2011-2.jpg". If I exported a third image with the same copy name it would be called "SydneyOperaHouse_May2011-3.jpg". All good.

Now, if I had instead selected the second and third images and exported them, I would be prompted as before, but it would call both images "SydneyOperaHouse_May2011-2.jpg" so the third image would overwrite the second image and I'd end up with only 2 images instead of 3.

Interestingly, if no duplicate image existed before the export, multiple images with the same copy name exported together are named correctly so the problem appears to be only the handling of duplicates that pre-exist.
Photo of A TJ

A TJ

  • 14 Posts
  • 3 Reply Likes

Posted 7 years ago

  • 1
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2595 Posts
  • 328 Reply Likes
Just to clarify the final scenario that doesn't work:

You have an original image, and 2 virtual copies, and you've exported the original image, once, and its JPG exists in the output directory and when you export each of the two virtual copies as a single batch, they both get a supposedly unique-name that has a -2 at the end, so one overwrites the other?

Assuming that is correct, does it work any differently if you have the original and only one virtual copy and export both the original and virtual copy, again, do they both get -2?

Assuming the 2nd option of original and one VC also behaves the same, then the issue seems to be that LR computes the unique names based on what exists in the export directory before the export starts without regard to the unique names that are created for each file. A fix would be to add each generated name to the list of export names that LR is considering as "existing" as it computes each new unique name before it starts to export. LR should also throw an exception if its unique names clash with an existing file as it is actually exporting.
Photo of A TJ

A TJ

  • 14 Posts
  • 3 Reply Likes
This has nothing to do with virtual copies. There are completely different images that happen to have the same copy name.

If I have one existing image file of the same name and export more than one with the same name, I only end up with one new image file.

If I have more than one existing image file created from the same copy name and I export one image (with the same copy name), a new file is created with the next number in sequence.
Photo of A TJ

A TJ

  • 14 Posts
  • 3 Reply Likes
Here's another write-up I did on the problem: http://www.lightroomforums.net/showth...
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 376 Reply Likes
ATJ,

It does sound like a bug to me, although I suppose it could be working as designed - dunno.

That said, I recommend changing your convention so you never run into this bug again.

For example, if all filenames in your catalog are unique, then you don't have to rename when exporting (unless you're exporting virtual copies).

Rob
Photo of Steve Sprengel

Steve Sprengel, Champion

  • 2594 Posts
  • 328 Reply Likes
Rob, do you realize you’re replying to a 3-year-old thread? The RSS feeds for these feedback forums sometimes show very old messages as unread. Mine has been giving me a few from 2011 each day. How are you seeing this message to reply to it?
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 376 Reply Likes
Yes - I knew the age of the thread when I replied. Sometimes I look over old threads and reply to them..
Photo of A TJ

A TJ

  • 14 Posts
  • 3 Reply Likes
It has actually been fixed in LR5 - finally!