Deleting All IPTC tags

Started by jcharmon, June 02, 2017, 06:40:42 PM

Previous topic - Next topic

jcharmon

I know the command that's supposed to delete all IPTC tags (-overwrite_original_in_place -IPTC:All=) and I've successfully used it to clean up a large number of older files (to rely only on XMP as Phil suggested in https://exiftool.org/forum/index.php/topic,7935.msg40477.html#msg40477).

However, I have about a thousand files remaining for which this doesn't work (Nothing changed in [file]     0 image files updated     1 image files unchanged).

Is there a preferred way to work around this problem?

Phil Harvey

Are you sure these files contain IPTC?  Send me a sample and I'll see what's going on (philharvey66 at gmail.com)

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

OK.  This is a bit tricky.  The problem is that the IPTC is in the wrong location.  It is in IFD0 of the EXIF metadata instead of in APP13 like it should be.

When writing, for speed reasons ExifTool doesn't parse the EXIF segment unless you are editing some EXIF tags, so it won't find this IPTC to delete it.

Try this command to get ExifTool to delete the IPTC in this location:

exiftool -iptc:all= -exifversion-=dummy FILE

I will look into adding a warning when ExifTool reads a file with IPTC in the wrong location like this (the warning is issued with the -validate option, but not otherwise).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jcharmon

Excellent! That seems to take care of the problem. No telling what program caused this, as I used several about this time, but even so it seems to have been a bit random (only a small percentage of the files where I was cleaning out IPTC tags were affected like this).

Many thanks.

John

jcharmon

A follow-up to this old thread:

I've discovered three files for which I'm unable to delete legacy IPTC data, even after running the commands you outlined above. It appears these have the same issue you had identified, but the repair didn't take. I ran this command (using the IMatch command processor):

Quote-validate
-all
-v3
{Files}

and got the attached output. Any suggestions on how to repair these files and completely delete the legacy IPTC data?

Many thanks.

Phil Harvey

Did you get an error when trying to delete the IPTC?  If not, send me a file and I'll take a look (philharvey66 at gmail.com)

Also, there is a new way to force EXIF to be rewritten:  -forcewrite=exif

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jcharmon

No error reported, but the IPTC tags are still there. The forcewrite option didn't seem to help (the image file was updated, but still has legacy iptc data). I've sent you a link to one of the files.

Thanks.

John

Phil Harvey

Hi John,

This works fine for me with the sample you sent:

> exiftool tmp/DSC_5070_Nik_HDR.tif -iptc:all
Keywords                        : architecture, capitol, New York State Capitol
Application Record Version      : 4
Date Created                    : 2011:07:07
Time Created                    : 01:06:40-06:00
Digital Creation Date           : 2011:07:07
Digital Creation Time           : 01:06:40-06:00
City                            : Albany
Sub-location                    : Albany
Province-State                  : New York
Country-Primary Location Code   : USA
Country-Primary Location Name   : United States
Credit                          : John Harmon
Copyright Notice                : John Harmon
Caption-Abstract                : Great Western Staircase, NYS Capitol
> exiftool tmp/DSC_5070_Nik_HDR.tif -iptc:all=
    1 image files updated
> exiftool tmp/DSC_5070_Nik_HDR.tif -iptc:all
> exiftool -ver
12.05


- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

jcharmon

Thanks for checking this! I downloaded and ran jExifToolGUI with the command you used. Success, but only after I cleaned up sidecar files and other issues. I think those are why I had problems initially.