# Duplicate file issue from multiple SD cards with files from the same day that have the same file name



## Lukat (Apr 23, 2018)

I am trying to find a work around for scenarios where I'm working off of multiple SD cards and have multiple files from the same day that have the same file name. I want to make it so I don't accidentally erase photos because LR thinks they are "duplicates" as a result of identical filename.

God knows how many times I've accidentally erased files because LR thought that there was already an identical file in the folder I was transferring to. "File already exists at the destination" should read "File with the SAME NAME already exists at the destination." It's the worst.

Why can't the system differentiate between two files with the same name...is there a way to disaster-proof my library against this?  

Can someone give me a push in the right direction?!


----------



## Gnits (Apr 23, 2018)

A lot of people do not recognise this as a real world problem.  Different people will approach the solution in different ways depending on their workflow.

First of all... minimise the problem by setting your camera / cameras not to reset the sequence number when formatting the cards. This is not a solution, but it avoids you having sequence number 1, 2, 3 for every card you load to Lr.

Some people load their images into a folder where the date is used in the folder or file name. This will work for some, if using a single camera, but may break down if using multiple cameras.

Another option is to add a unique number to each filename.... to guarantee that each filename imported is unique.  You will have to depend on your workflow to avoid duplicate images.

Downloader Pro allows you to translate the camera serial number to a single digit code when copying images from card to disk. By including this code in the filename you can avoid the same number been used by 2 different cameras. Lr does not have such an option and Downloader Pro only works on Windows.

For a while, I used PhotoMechanic to transfer from Card to Disk.  I was able to use the metadata substitution codes to create filenames which were unique.  PhotoMechanic has the advantage that it works for Mac and Windows ... but has the disadvantage that the GUI is well past its best, it is difficult to use... but most importantly ... it kept losing the unique sequence number count.

In the end I wrote my own pre-processer for Lr.   This does most of the things that Lr fail to do, such as allowing me to filter on date and file type, check there is a raw for every jpg and a jpg for every raw. Most importantly, I check the serial number of the camera for every file processed and generate a unique single digit code. I create an output file which contains the unique serial number code and adds the running unique sequence number to every file processed.  I also maintain a list of projects, so the project number is tagged to every file processed.  I got fed up waiting for Adobe to add this basic functionality to the import module, so I did it myself.


I would be happy to answer any specific queries you have.


----------



## Laura Smith (Apr 23, 2018)

Doesn't renaming files on import fix this? I have date and time in my filenames but if two shots are in the same second Lr puts "-2" on the end of the second one. Am I setting myself up for future disaster without realising it?


----------



## Johan Elzenga (Apr 23, 2018)

Laura Smith said:


> Doesn't renaming files on import fix this? I have date and time in my filenames but if two shots are in the same second Lr puts "-2" on the end of the second one. Am I setting myself up for future disaster without realising it?


No. Renaming files with date and time means that Lightroom could only overwrite a file if it's truely a duplicate. That would be a waste of time, but nothing else. The disaster is if Lightroom would overwrite a file which is different.


----------



## Gnits (Apr 23, 2018)

Laura Smith said:


> Doesn't renaming files on import fix this? I have date and time in my filenames but if two shots are in the same second Lr puts "-2" on the end of the second one.


 I have never tested this..... if that is the way it works .... good.


----------



## Johan Elzenga (Apr 23, 2018)

Gnits said:


> I have never tested this..... if that is the way it works .... good.


It's how it _should_ work, but according to the OP it does not.


----------



## Laura Smith (Apr 23, 2018)

Ahh I see. Thanks!


----------



## mcasan (Apr 23, 2018)

I shoot with two E-M1 II bodies with 128GB fast cards in slot1 that overflow to slot 2 that has 256GB slow card.    I have the camera name the files with the last few digits of the camera body serial number followed by a sequence number.     That is because the camera will not let me use the full serial number.  When I import I have Lr rename to full camera body serial number followed by 4 digit sequence number and store the files in folders based on shoot date.   So unless I shoot more than 10,000 files per day on the same camera body, virtually no chance of duplicated files.


----------



## Jim Wilde (Apr 23, 2018)

JohanElzenga said:


> It's how it _should_ work, but according to the OP it does not.



Absolutely right. In fact there were a couple of posts recently (one here, one at the U2U forum) which suggested that Lightroom was *replacing *older files with the new files in the current import if they had the same name. Which clearly isn't supposed to happen, so I ran some tests using 7.3 to see if I could reproduce the issue. Fortunately I couldn't, as on both platforms Lightroom happily imported files into a folder which contained different files with the same name (the second set of imported files are given the "-2" suffix)...exactly as it is supposed to.

Having said that, I'm curious about the message that the OP reported, as I've never encountered it on all my years on the forums. I'd very much like to see a screenshot when/if that next occurs.


----------



## Gnits (Apr 23, 2018)

It is great that some cameras now allow the user to change aspects of the saved file name. My Sony A7r3 provides some options.

On the other hand, some cameras do not provide the serial number in the metadata, readable by Lr, such as Sony cameras.

So..... Increasing options available to limit the possibility of duplicate file names.


----------

