help needed with copying tags within file

Started by godspeedphoto, November 05, 2019, 10:54:13 AM

Previous topic - Next topic

godspeedphoto

again, thanks so much Phil.

so, the original command line works beautifully for both jpgs and rw2 files if i run it in a powershell window (see exiftool1.png).

using a slightly modified ARG file (changed overwrite_original to overwrite_original_in_place, and added -v3 switch) so that i can use the command via the Windows Sendto shortcut:
--ext
rw2
-XMP-lr:HierarchicalSubject=
-XMP-lr:HierarchicalSubject < XMP-acdsee:keywords
-overwrite_original_in_place
-execute
-ext
rw2
-srcfile
%d%f.xmp
-XMP-lr:HierarchicalSubject=
-tagsfromfile
%d%f.xmp
-XMP-lr:HierarchicalSubject < XMP-acdsee:keywords
-overwrite_original_in_place
-k
-v3


i am seeing strange behavior, depending on if its a jpg or rw2 file.  See attached exiftool2.png to see the results.  My understanding of how the windows sendto shortcut works, is that it automatically adds the filepath to the end of the command.  So to mimic that behavior, i am using powershell to call the various command scenarios.  If i put the path to the file before the call to -@ or after, different things happen depending on the file extension.
rw2 fles only work if the filename is AFTER the -@ argfile, while JPG files only work if the filename is BEFORE the -@ argfile.

I've tried various adjustments this morning, but i can't seem to figure out why the 2 types of extensions behave differently depending on where the filename is placed in the exiftool command.

i really do appreciate all the help Phil, you are certainly going above and beyond at this point...

-Joe

Phil Harvey

Right.  For the file to be applied to both commands, you would need to use -common_args.  Sorry, I didn't think of this before.

exiftool -@ YOUR_ARGS_FILE -common_args

Then the file names come after this.

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

godspeedphoto

that did it!  thank you so much for helping me through this.  I did learn alot about how exiftool processes commands in this exchange, so hopefully i can figure out any additional tweaks in the future :)

so the addition of -common_args tells exiftool that the "invisible" filepath (not shown but implied) should be sent to each of the commands within the ARGFILE, of which there are 2 commands, since there is ONE -execute causing the separation?

just wanting to make sure i understand the processing logic...

-Joe

Phil Harvey

Hi Joe,

Yes, the purpose of -common_args is to apply any arguments after this option to each -execute'd command on the command line (plus the last one, which doesn't need a -execute option).  The "invisible" filepath is added to the end of the command by Windows, so this works out nicely.

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

godspeedphoto

awesome Phil, thank you again so much for your assistance and for making this great tool available to the masses.

-Joe