part of exif tag

#1 : 15/07-25 14:42
Alexander
Posts: 8
Hi, I believe it should work with a regular expression, but I’m struggling with the syntax.
How do I add the 8 and 9th part of the exif tag <Model>
Or how do I add only numbers from exif tag <Model>?
<Model> = "iPhone 16 Pro"
Alexander
#2 : 16/07-25 05:48
Delta Foxtrot
Posts: 529
Reply to #1:

Hi again, Alexander

You can't use a tag within a tag, so you can't do something like <Model<substr:8:9>>.

You can add a tag to a filename (New name, Replace, Add methods, for instance) and THEN use a regular expression to weed out what you don't want. For instance:

NEW NAME method:
New name: <Name>_<Model>

REPLACE method:
Replace: _.{7}(\d2).*$
Replace with: _$1
Use regular expression: CHECKED

If you have underscores in the original filenames you'll have to use some other divider character. The idea is just to use something that's not already in your filenames.

If you have other camera models in the metadata you may have to add an {if} statement to one of the methods to get only those with what you want to add in the right place in the tag (I'm not the best one to help you with that because I don't use the {if} clause). OR you could add a replace method and revert to <Name> for any passed new filename that doesn't end in "_\d\d" (this is what I would use if I were doing something like this without scripting).

Best,
DF
#3 : 16/07-25 06:47
Alexander
Posts: 8
Hi DF,

>> You can't use a tag within a tag, so you can't do something like <Model<substr:8:9>>.
:-) This is exactly the syntax I was looking for :-)

Thanks for the additional explanation, problem now solved.
Alexander