Batch correcting filenames / paths in a lightroom catalog

  • Thread starter Thread starter snorcup
  • Start date Start date
Status
Not open for further replies.
S

snorcup

Guest
First off, I searched for this but was unable to find anything. If I am repeating an answered topic I apologize, I may have been searching the wrong keywords.

For quite some time after upgrading from Lightroom 1 to Lightroom 2, I was running both versions in parallel. For some strange reason, I was never able to get Lightroom 1 removed from my PC.

Time and time again, when I was being careless and not paying attention Version 1 would open and auto import my images. After the import was complete, I would go to open my secondary screen, and realize that I was in version 1. Afterward I would open Version 2, and re-import the images, since each version was operating off it's own catalog.

The root of the problem has been solved. I recently built a new computer, installed Windows 7 from scratch, migrated my current LR2 catalog to the new machine, and everything is good.

Searching my raw image file directory, I came to realize that EVERY photo that had a duplicate copy of the raw image was followed by "-2", for example I would have img_''55.crw, and img_''55-2.crw.

I searched my directory for file names containing "-2" and moved all of the duplicates out of my primary raw image directory to a temporary folder for safe keeping in case I needed them later.

The problem is, every one of these images in my current LR catalog points to the RAW file with -2 tacked onto the file name. Currently, I get a warning message that the original file can not be opened, I right click the image, choose show in explorer, and choose the appropriate file (IE, the same file name without the -2 on the end).

What I am looking for is an easy way to update my catalog instead of doing this image by image. If it were a standard SQL database, a simple query to find any image location that contained "-2" and remove it would take care of the issue. Is there a similar way to update the LR catalog?

Also, a mass update based on date would not be appropriate either, because at times I would open LR2 manually and do the import. As a result, images that were done with the auto import first then imported a second name contain the -2, but for the instances where I opened LR2 and started the import, the RAW files were not duplicated, and my current catalog points to the correct RAW file.

I know this is a unique, off the wall problem that I created for myself, I am just looking for an easy way out :) Also, if I explained the situation poorly I apologize. I understand the issue, it's just kinda tough to describe accurately.

If anyone has any ideas, I would love to hear them.
 
It sounds like you're familiar with databases - in which case, it's a SQLite database. If you fancy playing with a copy of your catalog, you could do.

Other than that, how easy would it be to put all the -2 files back in their right places (so that LR knows where to find the files), and then how attached are you to the original file names? My initial thought would be to leave the -2 files where they were originally, do a batch rename to something sensible (i.e. YYMMDD-HHMMSS) and then once that had finished, it would be quite easy to remove the leftover IMG files.
 
My raw image folder is managed by lightroom which breaks images down into a directory structure with each RAW file in a folder for the date it was taken. That was why I removed the "-2" files, since they were easy to find using a file search.

Knowing that the catalog is an SQLite database may be the hint I needed :)

Thanks for the help
 
Can you create a filter in LR so that only the images with file names like nnnnn-2.crw are selected. Then you can remove them from LR in one go.

update... just realized you need to re-point them not remove them.....

It may be easier to use something that can rename the files at the OS level to add the '-2' back in. Then you could rename in LR to get rid of the '-2'.
 
Status
Not open for further replies.
Back
Top