i tried to use the exiftool - but with not so much success.
I need to extract the title and the description for the exif Data from the Filename.
I have a Folder filled with jpgs named in a specific Pattern, for example 123AB_-12AB-23BD-34DE
I would like to use everything before the _- as Title and everything after as description.
I would prefer a solution using Windows (found some VBA code but didn't get it up and running) but any other solution (Linux etc.) would help too, even if I have even less knowledge of Linux ;)
Would really appreciate your help!
Christian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Title works just fine. Unfortunally the description always uses the full file Name?! (from Start to End in both cases, just without the extension in the second case)
I tried to understand the syntax of the filename filter, but it seems there is something wrong in my version:
As the Title works like a charme i thought that "-title<${filename;s/_-.//}" means: <${} variable, s/ search, _- the searched string, ,// everything before the searched string?
So i tried the following:
"-description<${filename;s/-_//;s/.[^.]$//}"
then I get an syntax Error for filename
Unfortunally i can't find an Documentation on the filenames Syntax to test it further by my self.
Could you lend me a hand?
Kind Regards
Christian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
i tried to use the exiftool - but with not so much success.
I need to extract the title and the description for the exif Data from the Filename.
I have a Folder filled with jpgs named in a specific Pattern, for example
123AB_-12AB-23BD-34DE
I would like to use everything before the
_-
as Title and everything after as description.I would prefer a solution using Windows (found some VBA code but didn't get it up and running) but any other solution (Linux etc.) would help too, even if I have even less knowledge of Linux ;)
Would really appreciate your help!
Christian
Hi Christian,
Try this from the cmd.exe command line in Windows:
Last edit: Phil Harvey 2019-12-06
... but that will leave the file extension in the Description. Try this if you want to remove the extension:
Hi Phil,
thank you so much for your Support.
The Title works just fine. Unfortunally the description always uses the full file Name?! (from Start to End in both cases, just without the extension in the second case)
I tried to understand the syntax of the filename filter, but it seems there is something wrong in my version:
As the Title works like a charme i thought that "-title<${filename;s/_-.//}" means: <${} variable, s/ search, _- the searched string, ,// everything before the searched string?
So i tried the following:
"-description<${filename;s/-_//;s/.[^.]$//}"
then I get an syntax Error for filename
Unfortunally i can't find an Documentation on the filenames Syntax to test it further by my self.
Could you lend me a hand?
Kind Regards
Christian
Hi Christian,
Right. My mistake. Change the
-_
to_-
in that argument.Google for "Perl regex" for all the details about the syntax.
And thanks for the donation!
Last edit: Phil Harvey 2019-12-09
Hey Phil,
oh, now I feel a little dumb - i transferred the -_ also :-D
Thank you so much, it works like a charm!