Main Menu

Default exiftool arguments

Started by krzysiu, June 10, 2024, 02:01:16 PM

Previous topic - Next topic

krzysiu

Hello!

Is it possible to set default parameters to exiftool? Something more neat than aliases. Example config gives this:
# Specify default exiftool command-line arguments
# - inserted before all other options except -config
# - applies to all -execute'd commands
@Image::ExifTool::UserDefined::Arguments = (
    '-i', 'HIDDEN', # ignore hidden files by default (names beginning with ".")
);
...so I tried this:
@Image::ExifTool::UserDefined::Arguments = (
    '-overwrite_original'
);
1;
But that does nothing. I'm sure config file is used as using 0 on the end returns "c:\sharedlib\.exiftool_config did not return a true value at Image/ExifTool.pm line 9301."

Any ideas? Or I have to resotr to exiftool.bat with
exiftool.exe -overwrite_original -p %*
"We would use teleporters and live on another planets, if only ExifTool would be present when I was researching cosmos and physics"
Albert Einstein

Phil Harvey

I tried your config file and it works as expected.  No _original is saved.

- 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

What version of exiftool are you using?
exiftool -ver

The default arguments config requires Version 12.78+
* 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).