Description filed with variables

Started by zematima, September 21, 2015, 12:56:04 PM

Previous topic - Next topic

zematima

Hi:
I would like to know if it is possible to do this:
The field Description in Metadata (Core data) is empty.
I have in all my file names the ISO Country Code , City and Location.
Is there a way (or script) to put this information in the Description field?
For instance a file name like 05042002-PT-Sintra-Praia Grande.jpg would put on the Description field PT Sintra Praia Grande.(PT is the ISO Country Code , Sintra the City and Praia Grande the Location)It would be nice to put instead an hifen between the main words:
PT-Sintra-Praia Grande
Thanks in advance.
JRosa.

sinus

You can do this quite easy with a Metadata-template.

My attachement will give you a clue, I hope.

[attachment deleted by admin]
Best wishes from Switzerland! :-)
Markus

zematima

Hi Sinus:
Thanks for your reply.
That's a good idea.
I build this Template and it works.
Thanks for your time.
Best regards,
JRosa.


[attachment deleted by admin]

Mario

That's metadata templates put to a good use.

It is often overlooked how powerful this feature is. The ability to fill metadata from variables helps to solve many of the common scenarios, from the requirement to store the camera name as a keyword to 'fixing' broken or missing metadata or to copy data contained in file or folder names or Attributes into metadata tags. I personally use them a lot.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

JRosa,

glad, that I could help!
Best wishes, Markus
Best wishes from Switzerland! :-)
Markus

zematima

Thank you both.
Just another question:
I have this code for the Title :
{File.Label|default:PG}{File.MD.XMP::iptcCore\CountryCode\CountryCode\0}{File.MD.Composite\City\City\0|substr:0,2}{File.MD.Composite\Location\Location\0|substr:0,2}
For the example given example it extracts PGPTSiPr
My question is how can I put the letters Si and Pr in upper case.
I know I have the fuction to_upper but where do i put it?
Thanks in advance.
JRosa.

Mario

to_upper is a function without any parameters. Just append it to your other variable functions, e.g.


{File.MD.XMP::iptcCore\CountryCode\CountryCode\0;to_upper}
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

zematima