What am I doing wrong?

Started by SteveF48, May 01, 2020, 07:58:15 AM

Previous topic - Next topic

SteveF48

I've just discovered that some piece of software has added my lr:HierarchicalSubject keywords into keywords. e.g. Insects|Ladybird|2-Spot is also shown as 3 separate keywords 2-spot, Insects and Ladybird.
I thought this command exiftool -overwrite_original -keywords= P1020443.jpg would delete the keywords, but it hasn't. Exiftool says:-
    0 image files updated
    1 image files unchanged

What am I doing wrong?
Thanks in advance,
Steve

Phil Harvey

Hi Steve,

Try this command to delete various types of keyword tags:

exiftool -keywords= -subject= -hierarchicalsubject= FILE

- 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 ($).

StarGeek

You don't mention what software you use, but usually there is an option to switch between adding each leaf of the hierarchy and just the last leaf, i.e. set each part as a keyword or set only the last part as a keyword.  Sometimes it's pretty deep in the options though.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

SteveF48

I only want to clear the keywords, I'm using IMatch 2020.4.10, exiftool 11.95.
What is wrong with the command I used? exiftool -overwrite_original -keywords= FILE
I don't want thousands of copy jpegs added to my system. Is the order of parameters significant?

Stargeek is right, I accidentally ticked the box that wrote the hierarchy and individual leaves. Now I want to delete just the individual leaves.
-Steve

StarGeek

Quote from: SteveF48 on May 01, 2020, 12:10:57 PM
What is wrong with the command I used? exiftool -overwrite_original -keywords= FILE

There's nothing wrong with the command, except that it only clears IPTC:Keywords.  IMatch follows the MWG standards, so it also saves the keywords to the XMP:Subject tag.  So you would have to clear both.

QuoteI don't want thousands of copy jpegs added to my system.

I don't understand what you mean. 

QuoteIs the order of parameters significant?

No.

QuoteStargeek is right, I accidentally ticked the box that wrote the hierarchy and individual leaves. Now I want to delete just the individual leaves.

Heh, IMatch is what I was thinking of.  And I believe that it has that checked by default.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

SteveF48

Quote
I don't want thousands of copy jpegs added to my system.


I don't understand what you mean.  Won't omitting -overwrite_original tell exiftool to copy the jpeg?
BTW Thank you for all the hard work you've put into exiftool, I wish I understood a fraction of its capabilities.
Steve

StarGeek

Ah, yes, you want to keep the Overwrite_Original option if you don't want exiftool to create backup files.  But since those backup files will have an extension like .jpg_original, it's probably unlikely that they'll be added in.  I could be wrong though, I haven't checked.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

SteveF48

I read an old post, which I've searched for but can't find again, about finding corrupt metadata with Exiftool of course.
I thought that I'd correctly interpreted Phil's instructions, but this doesn't work:-
exiftool -if "$warning or error" -directory=D:\Damaged -r D:\Photos\2011
The output is:-
   30 directories scanned
16402 files failed condition
    0 image files read


Thanks in advance,
Steve

StarGeek

Try
exiftool -if "$warning or $error or $validate ne 'OK' " -directory=D:\Damaged -r D:\Photos\2011

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

SteveF48

Ok that moved the files with errors, however I have no idea what is wrong with these files.
I'm sure that there's a way to copy, not move the files, and produce a log showing all of the errors.
I just don't know what that is.
Please can you tell me how to modify the command to do that?

Thanks in advance,
Steve

Phil Harvey

Hi Steve,

To copy the files, add -o . to the command:

exiftool -if "$warning or $error or $validate ne 'OK' " -directory=D:\Damaged -o . -r D:\Photos\2011

To see the errors/warnings, do this after they are copied:

exiftool -validate -error -warning -a D:\Damaged

- 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 ($).