Pb with selective keywords removal from EXIF Keywords

Started by Lagrandeimage, November 28, 2020, 05:43:59 PM

Previous topic - Next topic

Lagrandeimage

Hello all,

I want to remove certain keywords from the metadata of image files.

I read in a post on the forum that this was possible using the following command :

exiftool -keywords-=one -keywords-=two DIR.

So I went into a directory and entered :

exiftool -keywords-=XXX -keywords-=YYY *.jpg

I got the following messages :

19 image files updated
19 image files unchanged

And the tags were still there.

Any idea how I can solve this?

StarGeek

In what way are they still there?  Do they show up when you look at the output from exiftool or is it another program?

If the latter, then run this command (see FAQ #3) and look at the full output to see if the keywords are stored at another location as well
exiftool -g1 -a -s /path/to/files/

Keywords are commonly saved in multiple places, including IPTC:Keywords, XMP:Subject, and HierarchicalSubject.
"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

Lagrandeimage

Hello,

Thank you for your reply.

I looked at the output of the command you gave and the tags are present in two fields :)> IPTC Keywords AND XPM-dc Subject.

Running the -keywords-=XXX command only deletes the IPTC Keywords. is it possible to delete also the XPM-dc Subject Keywords.

On a sidenote: how do I do ik keywords are two words (eg. The house), what is the syntax?

Thanks in advance,

Cheers!


Phil Harvey

Quote from: Lagrandeimage on December 01, 2020, 03:15:14 PM
Running the -keywords-=XXX command only deletes the IPTC Keywords. is it possible to delete also the XPM-dc Subject Keywords.

Add -subject-=XXX or -xmp-dc:subject-=XXX to the command.

QuoteOn a sidenote: how do I do ik keywords are two words (eg. The house), what is the syntax?

See FAQ 2.

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

Lagrandeimage

OK that works just great! Thanks a lot Phil

Now the more difficult question (at least for me) :

Instead of passing one by one the tags to erase on the command line with -keywords=XXX, can I feed the command from a file where I have all the keywords I want to erase? Because I have tens of tags to erase from thousands of photos.

Thans in advance!

StarGeek

Quote from: Lagrandeimage on December 01, 2020, 03:15:14 PM
On a sidenote: how do I do ik keywords are two words (eg. The house), what is the syntax?
See Writing Examples.  Use single quotes if you're using Mac/Linux/Windows Powershell, double quotes when using Windows CMD.

Quote from: Lagrandeimage on December 01, 2020, 03:56:41 PM
Instead of passing one by one the tags to erase on the command line with -keywords=XXX, can I feed the command from a file where I have all the keywords I want to erase? Because I have tens of tags to erase from thousands of photos.

Use the -@ (Argfile) option.  Place each part of the command on a separate line in a test file and then call that text file with -@ /path/to/file.txt.  Unlike the command line, you don't use any quotes in an arg file.

For example, you're arg file would look like
-Keyword-=The House
-Subject-=The House
-Keyword-=The Garden
-Subject-=The Garden

And then your command would be
exiftool -@ /path/to/file.txt /path/to/files/

The keywords are case sensitive, so if the keyword is THE HOUSE, you can't remove it with -keywords-=the house.
"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

Lagrandeimage

Hello,

Just awesome ! Thanks a lot, I am going to try that.

Cheers.