Page 1 of 2

ExifTool config not working.

Posted: Sun Apr 23, 2023 7:26 am
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

Re: ExifTool config not working.

Posted: Wed May 03, 2023 2:56 pm
by xnview
you can use a .bat with correct command

Re: ExifTool config not working.

Posted: Fri May 05, 2023 4:59 am
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.

Re: ExifTool config not working.

Posted: Fri May 05, 2023 10:11 am
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 ?)

Re: ExifTool config not working.

Posted: Tue May 09, 2023 5:50 am
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.

Re: ExifTool config not working.

Posted: Tue May 09, 2023 9:31 am
by xnview
ok, i'll check to add it

Re: ExifTool config not working.

Posted: Fri Jun 02, 2023 9:39 am
by xnview
See issue for current status and some details.

Re: ExifTool config not working.

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

Re: ExifTool config not working.

Posted: Wed Jun 21, 2023 7:22 am
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"

Re: ExifTool config not working.

Posted: Wed Jun 21, 2023 7:48 am
by xnview
how do you configure exiftool?

Re: ExifTool config not working.

Posted: Wed Jun 21, 2023 8:18 am
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"

Re: ExifTool config not working.

Posted: Wed Jun 21, 2023 11:32 am
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

Re: ExifTool config not working.

Posted: Wed Jul 19, 2023 7:04 am
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"

Re: ExifTool config not working.

Posted: Wed Jul 19, 2023 2:04 pm
by xnview
This problem is supposed to be fixed in XnView MP 1.5.1. Please check and confirm the bug fix here.

Re: ExifTool config not working.

Posted: Wed Jul 19, 2023 8:45 pm
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"