Main Menu

Copying IFD0 to XPM

Started by PhotoAddict, September 01, 2019, 06:40:48 AM

Previous topic - Next topic

PhotoAddict

Hi,
I'm trying to adapt the ExifTool command from this thread
https://exiftool.org/forum/index.php?topic=7020.0
to ExifTool Direct, inside ExifToolGUI, have tried a whole morning but can't figure out where to put my <, -, -sep etc...
Things I tried:
-XMP-dc:Subject<IFD0:XPKeywords (doesn't work)
-sep ";" "-IFD0:XPKeywords" "-XMP-dc:Subject" %1 (doesn't work)
-XMP-dc:Subject<IFD0:XPKeywords - sep ";" (doesn't work)
...you get the picture.
Thanks in advance.

P.S.: this is a common issue I have... are there some resources specifically for ET Direct? just found the usual ExifTool syntax guide, but the two are obviously very different...

Phil Harvey

I don't know the quoting rules for the ExifTool Direct box, but I would try this:

-sep ", " "-Subject<XPKeywords" "-xmp:Rating<Rating"

- 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

It should be -sep ";" to copy XPKeywords, as the semicolon is what Windows uses to separate the keywords.

To clarify the issues with the commands that you tried, just in case anyone else comes across this thread
Quote from: PhotoAddict on September 01, 2019, 06:40:48 AM
-XMP-dc:Subject<IFD0:XPKeywords
This needs to be quoted.  Additionally, since XPKeywords is a simple string and not a list tag, it needs the -sep option.  The separator, as you show in your following commands, is the semicolon.  Without it, you get a single keyword equal to the full contents of XPSubject

Quote-sep ";" "-IFD0:XPKeywords" "-XMP-dc:Subject" %1
This would be a command for just listing the tags.  Additionally, %1 would be used in a Windows Batch file and would only provoke a File Not Found error here.

Quote-XMP-dc:Subject<IFD0:XPKeywords - sep ";"
Close, but the first part needs to be quoted.  Additionally, you have a space between the hyphen and the Sep.

QuoteP.S.: this is a common issue I have... are there some resources specifically for ET Direct? just found the usual ExifTool syntax guide, but the two are obviously very different...

Unfortunately, the Exiftool Gui is no longer maintained.  I'm lucky if I can even get it to work when I try to figure out problems that people have with it and it always dies on me after 3-4 uses.  But the syntax in the Direct box should be the same as on the command line.  You just don't include exiftool or the names of the files that you select in the gui.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

PhotoAddict

#3
Thanks to both of you, for moving to the appropriate section, for the prompt answers, the crystal-clear explanations and the patience.

The command
"-XMP-dc:Subject<IFD0:XPKeywords" -sep ","
worked like a charm.  ;)

For some strange reason, other photo apps can't read keywords as single entries using the semicolon (even though it's in my Win settings as list separator), but I had to use the comma (shows as * in the textbox of the appropriate field in ExifToolGUI). That way they are read as separate keywords. Go figure... anyway it works  :)

PhotoAddict

Giving back (sorta)... just in case someone needs to do the same...

After figuring out why it was the comma (it's what the smartphone app uses, duh! ;D ), I discovered it (the app) left unwanted spaces, which mess up my keyword database... so I used:
${IFD0:XPKeywords;s/\s+,\s+|,\s+|\s+,/,/g;}
to look for spaces before, after, before and after a comma, and substitute with a lone comma.
Thus, the command became:
"-XMP-dc:Subject<${IFD0:XPKeywords;s/\s+,\s+|,\s+|\s+,/,/g;}" -sep ","
...and it works perfectly!  8) 8) 8)

Thanks again!!!