# Assigning unique reference number to images in catalogue ?



## AlexBrandt (Aug 7, 2018)

Hello all,

I'm preparing to send some of my images to a press agency. Labeling and workflow is important in these cases...
I realize the best would be to be able to assign a unique reference number to each images of my catalogue, and when exporting, using that number as file name.

Is that possible ?
Essentially, I have to be able to go back in LR once the press agency has made their selection from small viewfile versions, and re-export at larger res of the images they chose.

What other solution can you recommend ?

Thank you !


----------



## Bernard (Aug 7, 2018)

If your images have a unique ref number, you can of course use it for exporting, I would suggest : yourname-yourrefnumber.
If not, you could rename your photos during export like this : yourname-date-yourrefnumber.
The best is to have a unique ref number for all images in the catalog during import by renaming them like date-sequencenumber.


----------



## AlexBrandt (Aug 7, 2018)

Bernard said:


> If your images have a unique ref number, you can of course use it for exporting, I would suggest : yourname-yourrefnumber.
> If not, you could rename your photos during export like this : yourname-date-yourrefnumber.
> The best is to have a unique ref number for all images in the catalog during import by renaming them like date-sequencenumber.


 
Hey Bernard,
That's the thing.  I don't have unique ref numbers.
Is there a way to batch apply ref numbers in one of the metadata fields which I can use during export ?


----------



## Wernfried (Aug 7, 2018)

I use the Run Any Command  Plugin. On export I run this command:

```
"c:\Program Files (x86)\Exif\exiftool.exe" -overwrite_original -preserve -MasterDocumentID={FullMasterFile} "{FILE}"
```

By this I add full path name to Exif tag "MasterDocumentID" - no matter which name the exported file gets.
Perhaps `-UniqueDocumentID={UUID}` would be also useful for you.

Base on the selected images you can read the exif data and print the path names into a plain text file. Then use such text file with Photo list importer in order to select these images in LR.


----------



## Wernfried (Aug 7, 2018)

I use the Run Any Command  Plugin. On export I run this command:

```
"c:\Program Files (x86)\Exif\exiftool.exe" -overwrite_original -preserve -MasterDocumentID={FullMasterFile} "{FILE}"
```

By this I add full path name to Exif tag "MasterDocumentID" - no matter which name the exported file gets.
Perhaps `-UniqueDocumentID={UUID}` would be also useful for you.

Base on the selected images you can read the exif data and print the path names into a plain text file (or just copy to clipboard):

```
exiftool -T -MasterDocumentID *.jpg
```

Then use such text with Photo list importer in order to select these images in LR.


----------



## Bernard (Aug 7, 2018)

Alex,
As I said, you can rename during export like : yourname-date-yourrefnumber , assuming your ref number is unique for any day. you will be able to retrieve the photo later in LR with the date and ref number.
another (big bang) option is to rename all photos of your catalog, if they are not too many to : date-filename  , again assuming your present filename (ref number) is unique for any day. Better backup the catalog and photos before !


----------



## Johan Elzenga (Aug 7, 2018)

There is a very easy method to do this. Create a file rename preset as follows: 'YYYYMMDD-HHMMSS-OriginalFileName'. Then use this to rename the exported files. Your exported images will get a unique file name this way, that can easily be found again in Lightroom.


----------



## johnbeardy (Aug 7, 2018)

Even easier - keep your originals with filenames following a convention like Johan suggests or with a sequential number - eg YYYYMMDD-SEQ Title. Export files with this name, maybe with your surname added during the export. So the unique ID is the original filename.


----------



## BarrySchwartz (Aug 7, 2018)

You may already know this, but check with the agency to see what their requirements are.  In addition to file-naming conventions, the agency may also have specific requirements for captions, descriptions, your copyright and contact information, whether or not each image is released, including contact information that goes with releases.


----------



## AlexBrandt (Aug 8, 2018)

Wernfried said:


> I use the Run Any Command  Plugin. On export I run this command:
> 
> ```
> "c:\Program Files (x86)\Exif\exiftool.exe" -overwrite_original -preserve -MasterDocumentID={FullMasterFile} "{FILE}"
> ...



Hey Wernfried,

Thanks for the tip but I think this is a PC doable suggestions you made  I'm on mac..


----------



## AlexBrandt (Aug 8, 2018)

johnbeardy said:


> Even easier - keep your originals with filenames following a convention like Johan suggests or with a sequential number - eg YYYYMMDD-SEQ Title. Export files with this name, maybe with your surname added during the export. So the unique ID is the original filename.


Hey John,

That's the thing. My original file names are not unique, so the unique ID cannot be the original filename.
I make a folder for each date, but within these folders there are similar file names to other folders.


----------



## AlexBrandt (Aug 8, 2018)

BarrySchwartz said:


> You may already know this, but check with the agency to see what their requirements are.  In addition to file-naming conventions, the agency may also have specific requirements for captions, descriptions, your copyright and contact information, whether or not each image is released, including contact information that goes with releases.



Hey Barry,
Yep, they have specific guidelines. I checked all that.


----------



## AlexBrandt (Aug 8, 2018)

JohanElzenga said:


> There is a very easy method to do this. Create a file rename preset as follows: 'YYYYMMDD-HHMMSS-OriginalFileName'. Then use this to rename the exported files. Your exported images will get a unique file name this way, that can easily be found again in Lightroom.



Hey John,
Thanks for the suggestion. The problem with this method would be that, the date and time would change with each export.
It means if I export one image today with and then re-export it next week in a higher res for instance, then the YYYMMDD-HHMMSS would change in the second export.  And that would be very confusing for the photo agency.


----------



## AlexBrandt (Aug 8, 2018)

Bernard said:


> Alex,
> As I said, you can rename during export like : yourname-date-yourrefnumber , assuming your ref number is unique for any day. you will be able to retrieve the photo later in LR with the date and ref number.
> another (big bang) option is to rename all photos of your catalog, if they are not too many to : date-filename  , again assuming your present filename (ref number) is unique for any day. Better backup the catalog and photos before !



Hey Bernard,
Nope, that's my problem, file names are not unique for any day.
I work in 35mm film negative and get the image scanned by the lab. When they provide me the digital files, these always have similar names that their scanner and/or software create when digitalizing.


----------



## Johan Elzenga (Aug 8, 2018)

AlexBrandt said:


> Hey John,
> 
> That's the thing. My original file names are not unique, so the unique ID cannot be the original filename.
> I make a folder for each date, but within these folders there are similar file names to other folders.


Because your images are shot (or scanned!) at a different time, the file name becomes unique if you use my proposed renaming scheme. I do indeed use this to rename my images on import already, like John suggested. That way it is even easier to track an exported photo, because I don’t have to rename anything on export. This should also work for scanned images.


----------



## Johan Elzenga (Aug 8, 2018)

AlexBrandt said:


> Hey John,
> Thanks for the suggestion. The problem with this method would be that, the date and time would change with each export.
> It means if I export one image today with and then re-export it next week in a higher res for instance, then the YYYMMDD-HHMMSS would change in the second export.  And that would be very confusing for the photo agency.


No, it would not. YYYYMMDD is not the date you exported the image, it’s the creation date of the original image. That date never changes, so your second exported image would get the same file name.


----------



## AlexBrandt (Aug 8, 2018)

JohanElzenga said:


> Because your images are shot (or scanned!) at a different time, the file name becomes unique if you use my proposed renaming scheme. I do indeed use this to rename my images on import already, like John suggested. That way it is even easier to track an exported photo, because I don’t have to rename anything on export.



Hey John,
Bellow I place a screenshot of my current naming structure.
I have a folder for each different type of camera (I only shoot film).
I make a folder for the scanned date. -> I shoot my rolls for films over several days (and sometimes weeks) so it's not practically to track shooting date.
Inside I place the files, I receive from the lab. They all have similar naming for reach rolls. Meaning, for example I have many "CNV000001.JPG" files but they are in different scan folders.

If I understand, in your method I would have to rename my file names before importing them in LR correct ?


----------



## AlexBrandt (Aug 8, 2018)

JohanElzenga said:


> No, it would not. YYYYMMDD is not the date you exported the image, it’s the creation date of the original image. That date never changes, so your second exported image would get the same file name.




Ahh, I see. Ok. I tested that and indeed it does give me  unique name.





I see I can then search LR with metadata based on date.
But how can I search with the HHMMSS ?


----------



## Johan Elzenga (Aug 8, 2018)

It would be better to rename on import, but it would still work if you rename on export.


----------



## Johan Elzenga (Aug 8, 2018)

AlexBrandt said:


> Ahh, I see. Ok. I tested that and indeed it does give me  unique name.
> 
> View attachment 11262
> 
> ...


Searching on the date and the original file name should be enough in your case. The HHMMSS is meant to keep unique file names if you shoot with more than one digital camera. In that case you better rename on import.


----------



## Wernfried (Aug 8, 2018)

AlexBrandt said:


> Hey Wernfried,
> 
> Thanks for the tip but I think this is a PC doable suggestions you made  I'm on mac..



Exiftool is also available for mac: 
*MacOS Package:          ExifTool-11.08.dmg (2.7 MB)* 

LR Plugins are independent from OS.


----------

