ExifTool Forum

General => Metadata => Topic started by: Dev388 on February 16, 2016, 01:28:24 PM

Title: Regex for extention and combine metta data
Post by: Dev388 on February 16, 2016, 01:28:24 PM
Hi, this is my first post,
I'm not familiar with CMD so I try and begin with GUI..
I try to write metta data

1. How to remove/replace the extention of image. I try to use filename for the keyword,

-EXIF:XPKeywords<$filename 
and the result is name of image.jpg. I just want the file name of image


2. It's posibe to combine my text and filename of image. for eg this is what i try

-EXIF: -sep ", " -XPKeyword="one, two, three" -XPKeywords<$filename" 
and the result is just filename with extention. I want one,teo,tree, name of image file

thanks and regard   ::)
Title: Re: Regex for extention and combine metta data
Post by: Phil Harvey on February 16, 2016, 03:01:45 PM
The sample config file (https://exiftool.org/config.html) included with the full ExifTool distribution (config_files/example.config) contains a BaseName tag that will do what you want.  XPKeywords is not a List-type tag, so you write a simple string like this to have multiple keywords:

exiftool "-exif:xpkeywords<one, two, three, ${basename}" ...

You could also do it without the config file using the advanced formatting feature with a command something like this:

exiftool "-exif:xpkeywords<one, two, three, ${filename;s/\..*//}" ...

But you mention the GUI.  These are commands for the command line.  I don't know how to do this in the GUI.

- Phil
Title: Re: Regex for extention and combine metta data
Post by: Dev388 on February 16, 2016, 03:13:00 PM
Thanks Phil.. it's still work with GUI

I have to learn so hard for it..

thanks and regard   :)