• 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.
  • 18 October 2022 It's Lightroom update time again and there's a new AI-based Masking tools and a new Content-Aware Remove Healing tool, as well as smaller features, new cameras, lenses and bug fixes! See this blog post for Lightroom Classic and this blog post for the Lightroom Cloud Ecosystem changes.

Plugin to do math/arithmatic on metadata fields

Status
Not open for further replies.
Joined
May 9, 2015
Messages
1,421
Location
Palo Alto, CA
Lightroom Experience
Power User
Lightroom Version
Classic
Lightroom Version
10.2
Operating System
  1. Windows 10
Hi,

I found myself with a stange problem. In need to decrease the numeric portion of file name in a large number of images by a value of 1. In other words IMG1234.jpg needs to become IMG1233.jpg. As the LR plugin API does not suppoort file name manipulation in plugin's it seems that one can use Jfriedl's "write Data Field" plug in (in bog-o-goodies" collection) to copy the numeric portion of the file name to another field such as Headline. But now I need a tool that can take the value in Headline (e.g. 1234) and subtract 1 from it after which I can use the "Headline" token in LR's file rename template builder to update the actual file name.

What I'm missing is the tool to do that arithmatic on the Headline tool so if someone can point me to such a thing, I'd be grateful. I though Lightroom Solutions' "search & replace" might do it, but I don't see how to do math in that tool (maybe just looking in wrong place).

Thanks -- Dan
 
Joined
Jun 20, 2009
Messages
19,469
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
Are you trying to rename a series of files (e.g. IMG1234-IMG1334) to ( IMG1233-IMG1333)? If they are in sequence you can rename from any starting value (i.e.IMG1233) and increment the rest by one.

If you don’t have a long series, it is probably just as easily to renamed the few images manually. If you did this manually, then you would like be done by now.


Sent from my iPad using Tapatalk
 
Joined
Mar 21, 2015
Messages
1,651
Location
Dublin, Ireland.
Lightroom Experience
Power User
To compliment Cletus remarks above.

Many people do not realise you can modify an individual filename using the metadata field for "File Name".

Just put your cursor into the section of the existing field name you wish to edit. Do not change the file type.

Very useful for individual file names or a small number of filenames.

I use this regularly to put meaningful filenames on exported images I send to people via email, etc.

1619252777591.png
 
Joined
May 9, 2015
Messages
1,421
Location
Palo Alto, CA
Lightroom Experience
Power User
Lightroom Version
Classic
Gnits: Thanks - I am familiar with renaming a single file in the metadata panel as well as using a file rename template,

Cleetus: the images needing the rename are not in an unbroken numeric sequence. There are gaps

John: thanks. I'll take a look at Jeffery's blog and give the LUA code a try.

Thanks all -- Dan
 
Status
Not open for further replies.
Top