Lightroom: Please Fix File Naming Issue

  • 4
  • Problem
  • Updated 6 years ago
  • Solved
  • (Edited)
Please fix the Lightroom issue in which pesky (-1) and (-2) digits that are added to files names for no apparent reason.

I rename using a custom template (0001_YYMMDD), and it does not get rid of these numbers that LR adds making a file number like 2485_111004.CRW become
2485_111004-1.CRW or
2485_111004-2.CRW

Running the rename command again does not get rid of these extra numbers. I need a way to rename that gives each file a unique number with no extra -1 or -2 or -3 digits at the end of each filename. Thanks!
Photo of Shaun Saxon

Shaun Saxon

  • 4 Posts
  • 0 Reply Likes

Posted 8 years ago

  • 4
Photo of Rob Cole

Rob Cole

  • 4831 Posts
  • 387 Reply Likes
I've seen this bug before (I think I reported it even). I think Lightroom thinks it has a file of the same name in the catalog, even though it doesn't really (maybe it used to, but didn't clean it up properly?), so to be safe, it appends the "unique name" suffix.

But definitely, you should check to see if it really does have a file of the same name you are trying to use already in the catalog - maybe its not a bug in your case. If that were the case, notifying the user would be nice but I don't know if it does that...
Photo of Geoff Walker

Geoff Walker, Champion

  • 223 Posts
  • 47 Reply Likes
The example you show makes perfect sense as the file numbers are the same. What is the token you are using for the first section of numbers?
Photo of Anders Lindgren

Anders Lindgren

  • 6 Posts
  • 1 Reply Like
The problem typically occurs if you rename a bunch of files with a pattern containing a sequence number, and the end result should have a "hole" in the sequence. (Concretely, this occurs for me when I scan slides, and a slide is missing from a box.)

For example: Assume that I want my pictures named "F1", "F3", "F4", and "F5" (i.e. no "F2"). I run my rename command on all files, starting with number "1". The result are the files "F1", "F2", "F3", and "F4". The next step is to select "F2" through to "F4" and do a second rename starting with number 3. The end result is "F1", "F3-1", "F4-1", and "F5". NOTE, AT THIS TIME THERE IS NO FILE NAMED "F3" OR "F4".

Fortunately, this is extremely easy to fix. When Lightroom renames the files, it picks one file at a time. Today, it starts with the first file "F2" and renamed it to "F3-1", as "F3" already is taken. If it instead would pick a file where the destination file is not present in the file system, in this case "F4" and rename it to "F5". It could then continue with the next file whose destination file isn't present and rename "F3" to "F4", and finally "F2" to "F3".

Seriously, as a programmer, I consider this algorithm being trivial, and it could probably be implemented by the Lightroom developers within minutes.
Photo of Alan Harper

Alan Harper

  • 457 Posts
  • 94 Reply Likes
I must admit that I do not understand Lightroom's file naming scheme, or even why they designed it they way that they did. However, it seems that I can't make it do what I want, and what I want seems easy and commonly needed.

When I open the raw file "foobar.raw" in Photoshop from Lightroom, I want it saved as "foobar 1.psd". The next time I open that raw file, I want it saved as "foobar 2.psd". This seems like such an easy and normal thing to ask for, but it doesn't appear that LR has the ability to append version numbers.

I am constantly editing file names. And the fact that I have to do it within Lightroom (and not in the Finder, as that will cause Lightroom to lose the file), is doubly annoying.

A
Photo of Shaun Saxon

Shaun Saxon

  • 4 Posts
  • 0 Reply Likes
In my case, these -1 and -2 digits are not appearing because there are duplicates in the folder or catalog. So I don't know why they are created.

I simply want the ability to create unique whole numbers for each file when I rename in Lightroom.

P.S. When I rename this particular job, the long stretches of -1 files turn into -2 files. When I rename a third time, the same -2 files turn back into -1 files. But the -X digits can't be made to go away.
Photo of Becky Sowada

Becky Sowada, Adobe Employee

  • 510 Posts
  • 107 Reply Likes
Hi Shaun,

You gave the rename format as (0001_YYMMDD). Can you specify what the 0001 is? Is that a sequence number, a static number, or some other value? Knowing that will help.

Thanks,
Becky
Photo of Shaun Saxon

Shaun Saxon

  • 4 Posts
  • 0 Reply Likes
Hi, Becky. The number is sequential. I will transfer the files to the workstation. Then I import into LR with the native .CRW filenames intact.

I will then rename using my custom template. I typically have several thousand to import, so my template for that is

a four digit number starting with 1

followed by an underscore

followed by the year, month, and date.

If I create virtual copies I know that I will the -1 or -2 extensions, but in this case I had not even started processing yet. And there were stretches of files with the -1 added to filenames.

So the extra digits appeal for different reasons, some understood and some not.

In either case, I want to be able to rename all the files with unique whole numbers.

So 2298_111006 and 2299_111006

Not 2298_111006 and 2298_1106-1

Again, regardless of how or why they appear I want to be able to rename all the files so that the extra digits go away.

I could rename the JPEGs in Bridge after processing to accomplish this (get rid of the -1 or -2), but then the files names do not match for any files I have exported to JPEG previously.

Thank you
Photo of Shaun Saxon

Shaun Saxon

  • 4 Posts
  • 0 Reply Likes
Clarification:

If I create virtual copies I know that it will add the -1 or -2 extensions, but in this case I had not even started processing yet.
Photo of john beardsworth

john beardsworth

  • 1223 Posts
  • 316 Reply Likes
Becky

To prove LR has a problem - set up a folder of 10 images and name them using a YYMMDD_{2 char sequence} {title} naming scheme. Now delete one image - the 4th - and try renaming them again. You'll see the 5th image onwards has a "-1" in the name.

You avoid it by renaming twice - once with a random renaming scheme, and then with the correct one.

John
Photo of Becky Sowada

Becky Sowada, Adobe Employee

  • 510 Posts
  • 107 Reply Likes
Thanks to both Shaun and John, I was able to repro this. I've logged a bug.

@Shaun - regarding your comment, "Again, regardless of how or why they appear I want to be able to rename all the files so that the extra digits go away."...
I was able to re-select all the images, apply the rename again, and that got rid of the -1. Not an ideal workaround, I know, but it might help you get your files back to where you want them for the present.
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 15586 Posts
  • 2344 Reply Likes
Official Response
Cleaning up some records. According to the bug base, this was fixed in Lightroom 4 timeframe. Let us know if you're still having issues in Lightroom 5.x