ExifTool Forum

ExifTool => Newbies => Topic started by: Happy Hobo on September 14, 2022, 04:14:16 PM

Title: Adding comment fails sometimes
Post by: Happy Hobo on September 14, 2022, 04:14:16 PM
I ran a reverse geocode on 425 files.

Used the result to make a script, sample line:
exiftool -comment="English Channel" FD5FF69B-8A32-4548-859D-DF21989368B3.jpeg
Each command names a single file.  All of the files are owned by me and have my group.

Some permissions are 664, and some are 600.

When I run the script, I get a mixture of
    0 image files updated
    1 image files unchanged

I see by
exiftool * | grep Commentthat only 150 of the files have comments.

Why?  Can I fix it?
Title: Re: Adding comment fails sometimes
Post by: StarGeek on September 14, 2022, 04:36:06 PM
What kind of files are they?

Comment is a tag that is very specific to only a few file types. Jpegs have a jpeg specific Comment tag but it isn't recommended to use it as it is very fragile and some programs will overwrite it.  For example, older Adobe programs would write "File written by Adobe Photoshop #.##" to the Comment.

The only output use list says there is only 1 file in that directory.  Are the others in sub-directories?  If so, you need to add the -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse).

Beyond that, you don't give enough information as to why.  Copy/pasting the exact command and output is needed to figure out the problem.
Title: Re: Adding comment fails sometimes
Post by: Happy Hobo on September 14, 2022, 07:27:18 PM
Most were JPEG, with some .mov & .png & .heif & .gif

I did provide a sample of the 425 commands in the script.  All the files were in the same directory, and since each file gets a different comment, there is only one file per command.  That's why all the messages say either one or zero. 

You've explained why the .png & .heif & .gif didn't get comments.  But some of the .mov and some of the .jpg did not get their comments.  Why not all, I don't know.

Anyway, I'm restoring the original files and converting them all to .jpg and starting over.
Title: Re: Adding comment fails sometimes
Post by: Happy Hobo on September 14, 2022, 11:27:56 PM
I copied in the original files, converted all non-JPEG (except .mov) to that format, and tried again.
ALL of them got comments.  Why some of the JPEGs and some of the .mov did not get comments before, I cannot tell.