News:

2023-08-10 - ExifTool version 12.65 released

Main Menu

argfile

Started by jween, October 07, 2022, 06:42:47 PM

Previous topic - Next topic

jween

Hello friends
I'm trying to figure out how to use the argfile to extract particular tags to enter into a database. I used to list all the tags on the command line but trying to clean up the code.

So I'm using the command line:

exiftool -r -@ RecArgs /Path/test.photoslibrary/originals/*

and RecArgs file contains

-filename
-filename (yes, I want a duplicate)
...more tags
-shutterspeed
-aperture
But I get errors like

Invalid TAG name: "filename "
Invalid TAG name: "filename "
...more errors
Invalid TAG name: "shutterspeed "
======== /PATH/test.photoslibrary/originals/3/37057B42-BF21-4714-95C3-B2F050E80B5A.jpeg
Aperture                        : 4.0
So, wondering why this seems to work for the "-aperture" tag but not the others?
Is this just not the way to do this?

Thanks!
Cheers
Jon

StarGeek Edit: Edited to correct formatting.

StarGeek

Quote from: jween on October 07, 2022, 06:42:47 PMInvalid TAG name: "filename "
Invalid TAG name: "filename "
...more errors
Invalid TAG name: "shutterspeed "

Notice the position of the quotes.  You have a trailing space.  You're trying to print a tag name that has a space on the end, which will always fail.

From the docs on the -@ (Argfile) option (emphasis mine)
    Normal shell processing of arguments is not performed, which among other things means that arguments should not be quoted and spaces are treated as any other character
* 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).

jween

Well, duh. ::)
Sorry, and thanks!

StarGeek

Oh it absolutely is not a "duh".  I've made that mistake so often it's the first thing I double check.
* 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).