Skip to main content
Inspiring
October 6, 2011

P: Please Fix File Naming Issue

  • October 6, 2011
  • 12 replies
  • 541 views

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!

This topic has been closed for replies.

12 replies

Legend
October 25, 2013
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
Participant
October 6, 2011
tolong
Adobe Employee
October 6, 2011
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.
john beardsworth
Community Expert
Community Expert
October 6, 2011
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
Inspiring
October 6, 2011
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.
Inspiring
October 6, 2011
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
Adobe Employee
October 6, 2011
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
Inspiring
October 6, 2011
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.
alanterra
Inspiring
October 6, 2011
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
Participant
October 6, 2011
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.