Skip to main content
Wurstkrapfen
Inspiring
August 13, 2024
Question

Batch renaming, removing -2 from from file name, is it possible?

  • August 13, 2024
  • 3 replies
  • 795 views

I would like to remove the -2 at the end of my photo file names after moving them, that gets added if I did not clean out my import folder. Is it possible to automate this?

This topic has been closed for replies.

3 replies

Conrad_C
Community Expert
Community Expert
August 14, 2024

What would make it very easy is a simple find/change file rename feature, but unlike Adobe Bridge and many other file management applications, Lightroom Classic cannot do this. That is why you need workarounds like hoping Preserved Filename will get you there, or using a third-party plug-in.

JohanElzenga
Community Expert
Community Expert
August 14, 2024

I believe this discussion is going nowhere, because it is unclear what the exact question is. You got files with '-2' at the end, because you imported them into a folder that already contained files with the same name. That is clear. But now the question is what you want to do next. Do you intend to first remove these older files and then rename the '-2' files? That should work and using 'Preserved file name' (which means 'the old file name', really) would be the way to do it. Or do you believe that some plugin might be able to do what Lightroom cannot do because your OS does not allow it, namely remove the '-2' from the file names while the old files with the same name are still present in the same folder? That is impossible.

 

-- Johan W. Elzenga
Wurstkrapfen
Inspiring
August 15, 2024

 

JohanElzenga
Community Expert
Community Expert
August 15, 2024

That is indeed how I read it, but 'after moving them' was apparently not clear enough, perhaps because you did not say where you would move them to, when you would move them (did you mean during import, or later) and if you would include those other images in the move. You also complicated things yourself by giving this erroneous reply: "File name can't be preserved if there already is a file with the same name in the import folder", which indicates you did not understand what the 'Preserved file name' is. It is an entry in your catalog. Lightroom records the old name in the catalog when a file is renamed.

 

I assume it's clear now and you've got your answer.

 

-- Johan W. Elzenga
Bob Somrak
Legend
August 13, 2024

If you DID NOT rename on import you can use Presereved Filename to name it to the original name.  (This MAY work if you did rename on import.  I did not try that)

 

Otherwise you can use the Search and Replace Transfer plugin by John Beardsworth

 

http://lightroomsolutions.com/complex-file-renaming-in-lightroom-thanks-to-search-and-replace/

M4 Pro Mac Mini. 48GB
Wurstkrapfen
Inspiring
August 14, 2024

File name can't be preserved if there already is a file with the same name in the import folder.

 

So the answer is "NO LR classic can't do it" but there are external plugins for it?

Bob Somrak
Legend
August 14, 2024

Of course not.  Why are you leaving the -2 file in the same folder as the file with the same name and then trying to name them the same name..   You can not do this rename using the Windows operating system so why would you expect LrC to do anything different. You move the -2 files using LrC to ANOTHER folder and then do the rename using preserved filename.  This is not a LrC issue, it is an Operating System rule that the two files can not be named the same in a single folder.  

M4 Pro Mac Mini. 48GB