ExifTool config not working.

Reported bugs that have been closed and/or resolved

Moderators: helmut, XnTriq, xnview, Dreamer

FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

ExifTool config not working.

Post by FKCapitalism2 »

I want to use config for exiftool however it has to be the -config my.cfg has to be the first argument for exiftool, and unfortunately XnView MP already sends commands before processing user input commands.

Image

Getting this error Ignored -config option (not first on command line) for this command -config my.cfg"-directory<firstfile"

Here is quote from manual.
the -config option of the exiftool application may be used to load a specific configuration file (note that this must be the first option on the command line): exiftool -config example.config
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

you can use a .bat with correct command
Pierre.
FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

Re: ExifTool config not working.

Post by FKCapitalism2 »

xnview wrote: Wed May 03, 2023 2:56 pm you can use a .bat with correct command
I like convenience of selecting files for which i want to perform the task trough XnView MP, i believe inside .bat file i would have to specify path to folder/file manually every time i run it.
Last edited by FKCapitalism2 on Fri May 05, 2023 10:17 am, edited 1 time in total.
User avatar
michel038
XnThusiast
Posts: 1468
Joined: Tue Sep 27, 2016 8:18 am
Location: France
Contact:

Re: ExifTool config not working.

Post by michel038 »

Did you try to use the default name for the config file ? ( .ExifTool_config in the same folder than ExifTool, or in XnViewMP folder, I don't remember if that works )

---
To send a set of files from XnViewMP to ExifTool, you can use the following syntax in a batch :

C:\XNviewMP\AddOn\exiftool.exe -overwrite_original "-iptc:city=Paris" "-xmp:city=Paris" %*
I think it doesn't work for folders (but perhaps with -r ?)
FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

Re: ExifTool config not working.

Post by FKCapitalism2 »

michel038 wrote: Fri May 05, 2023 10:11 am Did you try to use the default name for the config file ? ( .ExifTool_config in the same folder than ExifTool, or in XnViewMP folder, I don't remember if that works )
Not loading automatically even if renamed.

michel038 wrote: Fri May 05, 2023 10:11 amTo send a set of files from XnViewMP to ExifTool, you can use the following syntax in a batch :

C:\XNviewMP\AddOn\exiftool.exe -overwrite_original "-iptc:city=Paris" "-xmp:city=Paris" %*
I think it doesn't work for folders (but perhaps with -r ?)
xnview wrote: Wed May 03, 2023 2:56 pm you can use a .bat with correct command
Problem is .bat file can only take 9 parameters so it wont process more than 9 images at once and i am no batch expert to solve this limitation.

Just tried again and was able to pass exactly 111 images from XnView MP to bath file and successfully process by ExifTool.

However selecting more images and passing to .bat file - is not working, command line window just flash for second and closes.

Even if i created empty .bat file with just
@echo off
echo "Hello World!"
pause
still same problem when passing more than 111 images.

There is no such problem with running .exe file, you can pass any number of images.

Please for Tools > Open With would it be possible to modify XnView MP to pass selected image paths after command specified by user?

Besides its proper order in most cases to specify command line switches first and then path to files.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

ok, i'll check to add it
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.5.0 beta. Please check and confirm the bug fix here.
Pierre.
FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

Re: ExifTool config not working.

Post by FKCapitalism2 »

xnview wrote: Fri Jun 16, 2023 4:13 pm This problem is supposed to be fixed in XnView MP 1.5.0 beta. Please check and confirm the bug fix here.
Not fixed 1.5.0 beta 1

Command is:

Executable D:\Portable\XnViewMP\AddOn\exiftool.exe
Parameters -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress "-directory<%d$firstfile" -k


Process Explorer shows ExifTool is being started with following parameters:
"D:\Portable\XnViewMP\AddOn\exiftool.exe" "D:\NEX-5T\June 19 2023\_DSC0002.ARW" -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress -directory<%%d$firstfile -k

Expected like this (files after parameters):
"D:\Portable\XnViewMP\AddOn\exiftool.exe" -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress -directory<%%d$firstfile -k "D:\NEX-5T\June 19 2023\_DSC0002.ARW"
Last edited by FKCapitalism2 on Wed Jun 21, 2023 8:22 am, edited 5 times in total.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

how do you configure exiftool?
Pierre.
FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

Re: ExifTool config not working.

Post by FKCapitalism2 »

xnview wrote: Wed Jun 21, 2023 7:48 am how do you configure exiftool?
Ahh at first i did not notice you have added First Argument parameter to Open With dialog configuration, now i used it to place config there and it worked fine.

Image

However in my humble opinion is not very intuitive and over complicates things to have First Parameter and Last Parameter, at least for me.

It actually make command line look like this;

"D:\Portable\XnViewMP\AddOn\exiftool.exe" -config "D:\Portable\XnViewMP\AddOn\first_file.config" "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0001.ARW" "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0002.ARW" "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0003.ARW" -progress "-directory<%d$firstfile" -k

Would it not be easier to keep only one parameter (as in the previous versions), but execute it before list of files like this?

"D:\Portable\XnViewMP\AddOn\exiftool.exe" -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress "-directory<%d$firstfile" -k "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0001.ARW" "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0002.ARW" "D:\NEX-5T\June 19 2023\_DSC0001\_DSC0003.ARW"
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

FKCapitalism2 wrote: Wed Jun 21, 2023 8:18 am Would it not be easier to keep only one parameter (as in the previous versions), but execute it before list of files like this?
in many cases, it need to be after the file list
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

I remove last argument and keep only one like 1.4.5.

Issue

you'll able to use "-first_arg %1 -last_arg"
Pierre.
User avatar
xnview
Author of XnView
Posts: 46235
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: ExifTool config not working.

Post by xnview »

This problem is supposed to be fixed in XnView MP 1.5.1. Please check and confirm the bug fix here.
Pierre.
FKCapitalism2
Posts: 300
Joined: Sun Apr 23, 2023 5:14 am

Re: ExifTool config not working.

Post by FKCapitalism2 »

xnview wrote: Wed Jul 19, 2023 2:04 pm This problem is supposed to be fixed in XnView MP 1.5.1. Please check and confirm the bug fix here.
xnview wrote: Wed Jul 19, 2023 7:04 am you'll able to use "-first_arg %1 -last_arg"
its not clear how to use this, could you provide example usage?

I am getting this command line
"D:\Portable\XnViewMP\AddOn\exiftool.exe" "S:\-= NEX-5T =-\April 01 2023\_DSC0001.ARW" "S:\-= NEX-5T =-\April 01 2023\_DSC0002.ARW" "S:\-= NEX-5T =-\April 01 2023\_DSC0003.ARW" -first_arg -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress "-directory<%d$firstfile" -last_arg -K

for command

"-first_arg -config "D:\Portable\XnViewMP\AddOn\first_file.config" -progress "-directory<%d$firstfile" -last_arg -K"
Post Reply