Thread

Posted on Fri Apr 27 23:36:46 2007 by bozi
how filename to TAG?
Hi,
I tried to find out the best method to bring the filename or directory in the Tags.
I found in the manpage -TAG<=FMT ...
How is the right syntax?
exiftool '-iptc:objectname<=%f' je4r6479.jpg
brings the error
doesnt work (Tag 'iptc:objectname' is not writable)

exiftool -tagsfromfile @ '-filename>IPTC:objectname' je4r6479.jpg
did a fine job.
My Version is 6.87 , the tags are only examples
bozi
Direct Responses: 5010 | Write a response
Posted on Sat Apr 28 04:12:44 2007 by exiftool in response to 5005
Re: how filename to TAG?
Hi Bozi,

ExifTool is giving a misleading error in this case. I will fix this, thanks for pointing it out.

The error should be "Error opening file je4r6479".

The first command you used if for writing the contents of a file into the value of a tag, which isn't what you wanted.

Your second command copies the filename tag to the objectname tag, which is what you want. In this example though, the "-tagsfromfile @" can be omitted since this is assumed whenever tags are being copied unless another file is specified.

- Phil
Write a response