delete keywords if it already exists in $city, geosetter cleanup

Started by StK, April 30, 2015, 04:34:00 AM

Previous topic - Next topic

StK

Hi.
I read a lot here and thank you for this great tool.
I found a solution for each city itself, but I cannot find a batch-solution to clean up all my photos.

I accidently wrote thousands of Keywords using geosetter into my pictures. I ticked on the "write City, Country, ... also as Keyword".
This totally spammed my Keywordlist, and it is hard to find out, if Keyword "X" is a Cityname or not for manual cleanup.
I now have the Citynames in the City-tag AND in the Keyword-list.

The only solution i can imagine is to loop all photos and check, if the value of the city-tag is as well in the keywords-list and then delete this keyword.
I would probably do the same for country, ...

Is there any solution using the IF-clause of the exiftool?

thanks in advance

Joe

Phil Harvey

Hi Joe,

Did you try this?:

exiftool "-keywords-<city" "-keywords-<country" ... DIR

(but note that you should change the tag names to the ExifTool tag names that actually correspond to where the information is stored.  See FAQ 2 for help here.)

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

StK

Hi,

thanks a lot, I bet i tried this, but it didn't work.
I still have some issues but i think this should be geonames-issues. -> sometimes the keywords doesn't get updated correctly. closing geonames and reopening it works. Strange.
I think this bug got me searching into a wrong direction!
I will test this on some test-data.

Again, thank you a lot!

Heiko

Hello Joe,

you can also remove the keywords with GeoSetter. If you have activated "write City, Country, ... also as Keyword" you have to delete Country, City, .. in the "Edit Data" dialog of GeoSetter. Then the keywords will also be deleted. You can do this for folders including subfolders.

The disadvantage is, that you have to refill the location data (without the Option "write City, Country, ... also as Keyword)

Hope this helps