ExifTool Forum

ExifTool => Newbies => Topic started by: bartek on February 26, 2024, 11:09:19 AM

Title: How to Copy "Title" tag to "Description" + add some custom text
Post by: bartek on February 26, 2024, 11:09:19 AM
Hi,
I've searched a lot for this but cannot find an answer that works so I really hope you can help.

I'm using exiftool to copy the "Title" tag of multiple .jpg files into the "Description" tag.
So I have this command that does the job:

exiftool "-Description<Title" *.jpg

Now I would like to add some custom text (for this example let's say "Created by Bartek in 2024") to the end of the Description.

so the tag Description would have the Title+Custom text at the end.

Is it possible to do withing one command ?

Title: Re: How to Copy "Title" tag to "Description" + add some custom text
Post by: StarGeek on February 26, 2024, 11:32:57 AM
See this example command (https://exiftool.org/exiftool_pod.html#exiftool--commentISO-exif:iso-Exposure-shutterspeed-dir).

Try
exiftool "-Description<$Title Created by Bartek in 2024" file.jpg
Title: Re: How to Copy "Title" tag to "Description" + add some custom text
Post by: bartek on February 26, 2024, 11:42:29 AM
Hi! Thanks for your reply. I'm getting this error with this command:
Warning: No writable tags set from aayz.jpg
Warning: Invalid tag name 'created by bartek in 2024'. Use '=' not '<' to assign a tag value - aayz.jpg

and when I use = instead of <, than I just get the "Created by Bartek in 2024" without the title in front.
Title: Re: How to Copy "Title" tag to "Description" + add some custom text
Post by: StarGeek on February 26, 2024, 01:03:03 PM
On Mac/Linux, use single quotes around anything that includes a Dollar Sign because otherwise it is considered a shell variable instead of part of the exiftool command.

On Windows PowerShell, you can try single quotes, but no guarantee, as PS quoting rules are different. The above command will work in CMD.
Title: Re: How to Copy "Title" tag to "Description" + add some custom text
Post by: bartek on February 27, 2024, 04:07:57 AM
thank you. On windows 11 changing from " to ' did the job.
So:
exiftool '-Description<$Title. Created by Bartek in 2024' *.jpg
works perfectly as I wanted. Thank you for your help