very long argument sets and character limits

Started by pmassie, January 13, 2023, 05:35:33 AM

Previous topic - Next topic

pmassie

Hello
First off thanks so much for such a great tool.

Short version:
Is there a way to store very long exiftool commands in a text file, and then point exiftool at the text file?

eg.
> exif_args.txt:
-do_this:10 -do_that:20 -do_the_other:30 filea.cr3 -execute -do_this:11 -do_that:21 -do_the_other:31 fileb.cr3 -execute

> exiftool -parse exif_args.txt
Apologies if I have missed a question/section that addresses this, I looked but couldn't find one.

Long version:
I've been trying to add GPS data incl. horizontal accuracy to images in a way that Adobe Lightroom will include on exports. The only way I 've managed to get this working is to use exiftool to add the GPS data to each file individually, and then recreate LRs xmp sidecars before re-scanning the image data in LR. (LR will happily deal with lat lon and altitude, but this is the only sequence I've found where lightroom will include horizontal accuracy in it's exported files).
Adding the multiple GPS tags to each file turns into a long sequence of discrete exiftool `-execute` statements, which quickly eats up the allowed ~8k characters.
So I am trying to think of different ways to get this to work. I can batch the files, but that incurs the cost of instantiating exiftool for each batch. So I was wondering if perhaps I could store the long series of statements in a sort of config file, and then point exiftool at that file. maybe I can build a csv and ask exiftool to parse that?

Thanks very much in advance
Phil

Phil Harvey

Quote from: pmassie on January 13, 2023, 05:35:33 AMIs there a way to store very long exiftool commands in a text file, and then point exiftool at the text file?

exiftool -@ ARGFILE

Arguments in this file are separated by newlines, not spaces, and quotes aren't used.  See the -@ option documentation for details.

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

pmassie