• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

How could one replace text in an undefined amount of file names?

Status
Not open for further replies.

Biff

Active Member
Joined
Sep 7, 2018
Messages
545
Lightroom Experience
Beginner
Lightroom Version
Lightroom Version Number
8.2
Operating System
  1. Windows 10
How could one replace text in an undefined amount of file names?
 
You have to give more information. Lightroom has good rename options, but not the kind of ‘seach and replace’ you seem to want. Maybe a plugin can help, but without knowing what you want I can’t say that.
 
Lightroom doesn't have a feature allowing you to search and replace in filenames.

Bridge does - it's part of the batch rename command and is called "string substitution". So you would have to save metadata back to the files in LR, rename in Bridge, then reimport the renamed files and remove the initial "missing" ones.

To accomplish it in Lightroom, you need a workaround based on my Search and Replace plugin. See this article
http://lightroomsolutions.com/articles/complex-file-renaming-in-lightroom-made-simpler/
John
 
You have to give more information.
Well, more information than replace text in file names...suppose there is a word like "fish" in each of the file names and one wants to not to have it being part of the file names and replace it with another one, e.g. with "horse", how do you do it?

Lightroom has good rename options
Actually it does not look like that.

Maybe a plugin can help, but without knowing what you want I can’t say that.
I want to replace text / signs in file names with other text / signs.

So you would have to save metadata back to the files in LR, rename in Bridge, then reimport the renamed files and remove the initial "missing" ones.
Will that cause to lose the editing / history?
This looks like as if it will: "Warning: this method removes any pick flags, stacking, VCs , collections, history steps applied to the files: " Is it right? So I could not use that, I guess.

Many thanks for the link!
 
Yes, the Bridge method loses the History steps (and the rest), which is why one should first save metadata back to the files, which safeguards adjustments and other XMP metadata. The plugin workaround method preserves all metadata.
 
Well, more information than replace text in file names...suppose there is a word like "fish" in each of the file names and one wants to not to have it being part of the file names and replace it with another one, e.g. with "horse", how do you do it?
Yes, more information is needed, because it all depends on the rest of the file name. Suppose your files were named ‘Fish-20190312-01’, ‘Fish-20190312-02’, and you want to change that to ‘Horse-20190312-01’, etc. Lightroom can do that without any problem. I don’t understand why you make this such a guessing game. Just give an example of what you want to achieve.
 
Yes, the Bridge method loses the History steps (and the rest), which is why one should first save metadata back to the files, which safeguards adjustments and other XMP metadata. The plugin workaround method preserves all metadata.
Is this the plug in I would need: Search and Replace metadata in Lightroom One has to buy it?

Yes, more information is needed, because it all depends on the rest of the file name. Suppose your files were named ‘Fish-20190312-01’, ‘Fish-20190312-02’, and you want to change that to ‘Horse-20190312-01’, etc. Lightroom can do that without any problem.
Yes, that is what I want. May be you could tell me how this can be done, that would be great.

I don’t understand why you make this such a guessing game. Just give an example of what you want to achieve.
Very sorry, I didn't know it would be necessary.
 
Yes, that is what I want. May be you could tell me how this can be done, that would be great.
One more time: give me an example with the exact file name. The example that I gave you works because it rebuilds the entire file name based on custom text, followed by a date (read from the metadata) and a sequence number. That is what Lightroom can do. It can’t ‘search and replace’ part of a file name however, so if the original name is different, then Lightroom may not be able to change it the way you want.

Very sorry, I didn't know it would be necessary.
If I ask you for it, then apparently I need that information. And you still haven’t given it.
 
One more time: give me an example with the exact file name.
Oops, sorry, I thought you just did it...

The example that I gave you works because it rebuilds the entire file name based on custom text, followed by a date (read from the metadata) and a sequence number. That is what Lightroom can do. It can’t ‘search and replace’ part of a file name however, so if the original name is different, then Lightroom may not be able to change it the way you want.
Yes, I see.
"Dreh tingen36.JPG" to "Shoot-36.JPG" or to "1234-36.JPG" (or anything else for 1234) - this must be replaced: "Dreh tingen"
"Dreh tingen37.JPG" to "Shoot-37.JPG" or to "2234-36.JPG"
The last digjts (36, 37, etc.) must be kept.

And
"Dreh tingen36-1-3.tif" to "Shoot36-1-3.tif" (or anything else for "Shoot") - this must be replaced: "Dreh tingen"
"Dreh tingen36-1-4.tif" to "Shoot36-1-4.tif"
"Dreh tingen 37-1-2.tif" to "Shoot37-1-2.tif"
All of the lasts 6 digits must be kept (36-1-3, 36-1-4, etc.)

If I ask you for it, then apparently I need that information. And you still haven’t given it.
Yes, very sorry again, you are right.
 
That's an example that Lightroom can not do, because those numbers are not dates it can read from the metadata.

You could try it in very small batches, where you use 'Shoot36-1-' as custom text, and then let Lightroom add the last digit as a sequence number, but I doubt that this would be worth it and it is very easy to make a mistake.
 
OK. Or can Lightroom just remove "Dreh tingen" or parts / a part of it? Or somehow exchang letters, digits?
 
Lightroom builds an entirely new name. You can use custom text, things from metadata, the old file name and a sequence number, but not a part of the old file name. So to remove ‘Dreh tingen’ you would have to be able to rebuild the rest, and I don’t see how (except almost everything as custom text).

What you can do is create a new name based on the shooting date and time, or shooting date and sequence number, so something like ‘Shoot-20190422-1237’, or ‘Shoot-20190422-01’.
 
Ah sorry, I forget to / did not mention (again) or I was not sure about it myself: the most or only important is that the tif files are exports / copies from the jpg files, so e.g. "Dreh tingen36.JPG" is the original and "Dreh tingen36-1-3.tif" is a copy of it. And I just want to know that the copy is a copy (e.g. this one: "Dreh tingen36-1-3.tif") of e.g. "Dreh tingen36.JPG" So actually the file name does not matter at all or almost at all as long as I can see which ones of the tifs belong to its original jpgs.
 
In that case it should be easy. The capture date/time of the original jpeg and the tiff(s) is exactly the same, so any rename template that includes the capture date & time should work, unless you shot bursts at several frames per second. Lets say that you use ‘Shoot-YYYYMMDD-HHMMSS’, then the jpeg would become ‘Shoot-20190422-161515.jpg’ if you shot it today at 4.15.15PM. The first tiff would have the exact same name, but .tiff as extension, so it would become ‘Shoot-20190422-161515.tif’. If there is a second tiff, then Lightroom will automatically add ‘-2’ behind the name, so that one would become ‘Shoot-20190422-161515-2.tif’. You may not even have to include the seconds.
 
unless you shot bursts at several frames per second.

No, I didn't.


That is good. So I will try it that way. But the tifs are not in Lightroom / the Lightroom catalog because they are finished, so there is not need to have them in the catalog. I guess, I have to add them before, right?


So in the "Library" module I would search for all images having "Dreh tingen" in their file names, select / mark all of them and then run this renaming pattern?

qwPv4oL.png
 
"Temporarily" means adding them the usual way (via import) and removing them from the catalog after, there is no special option, I assume.
 
"Temporarily" means adding them the usual way (via import) and removing them from the catalog after, there is no special option, I assume.
Yes. Use ‘Add’ in the import dialog, do you don’t make copies. After renaming them, remove them from the catalog again.
 
Did not work: the only date / time in the EXIF of the tifs seems to be this one:
lEvOLWI.png

It corresponds with the date / time of the original jpgs.

Lightroom inserts the date / time of today / now....no, the time / date the tif was created / copied / exported from Lightroom obviously.

I cannot find that date / time to insert it in the file name when renaming. Where could I find it?

Can the renaming be undone?
 
Last edited:
The metadata of the tiff should contain the capture date, but maybe you stripped the metadata when you exported the tiff? That would change everything and really make this an impossible job. No, renaming cannot be undone. You have to use a backup to restore the situation.
 
The metadata of the tiff should contain the capture date, but maybe you stripped the metadata when you exported the tiff?
Yes, it looks like that:
R2CDCpT.png
 
Status
Not open for further replies.
Back
Top