News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

how filename to TAG?

Started by Archive, May 12, 2010, 08:54:04 AM

Previous topic - Next topic

Archive

[Originally posted by bozi on 2007-04-27 20:36:46-07]

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

Archive

[Originally posted by exiftool on 2007-04-28 01:12:44-07]

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