Command line switch to show which command line switches were invoked?

Started by handvprice, January 21, 2024, 11:16:35 AM

Previous topic - Next topic

handvprice

I probably missed it in the documentation, but is there a command line switch which will cause the output to show what command line switches were used? Helpful while I experiment with different usages to bend it to my will. TY.

wywh

If I understood the question correctly, I have used this (or just up arrow):

history 0
https://ss64.com/mac/history.html

handvprice

TY, but actually no. I just wanted the exiftool *output* to include a line showing what switches were used to invoke exiftool at the command line So one line of the output would include something like "exiftool.exe -a -U -G <filename.ext>". (I'm only interested in reading the exif data, not in writing anything to an image.)

StarGeek

No, there isn't an option to do so. The best alternative would be to type your command, copy it to the clipboard, and then paste it at the end with the -echo option.

Step by step
Type your command
exiftool.exe -a -U -G <filename.ext>
Copy it to the clip board, the add it to the end
exiftool.exe -a -U -G <filename.ext> -echo "exiftool.exe -a -U -G <filename.ext>"
* 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).

handvprice

Thanks for the rapid response!. May I then suggest it as an enhancement? (I think it would be relatively easy to implement).

I'm trying to wrangle some 20,000 pics from various cameras, and trying various sets of switches to see the tag results I need for each camera. If I redirect the output into a file, to come back to later, it helps to see which tags I used. That -echo approach is adequate. TY again.

(I can't believe how responsive the developers and forum moderators are for this program!)

Phil Harvey

You could also do this:

exiftool.exe -a -U -G <filename.ext> -userparam "Command#=exiftool.exe -a -U -G <filename.ext>"

This will output the command as a "UserData:Command" tag along with the rest of the tags.

Adding an option to automatically output the actual command is not possible because the command shell does parsing and globbing so ExifTool sees a modified version of the arguments used.

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