Exiftool Command from ButtonBar
Moderators: Hacker, petermad, Stefan2, white
- fidofido300
- Junior Member
- Posts: 28
- Joined: 2003-07-28, 16:55 UTC
Exiftool Command from ButtonBar
Hi
I am trying to run following command from Button bar but I could not succeed formatting it to run.
exiftool -ext '*' '-FileName<%f.$FileTypeExtension' -r ../images
../images is the variable part
Thanks in advance
I am trying to run following command from Button bar but I could not succeed formatting it to run.
exiftool -ext '*' '-FileName<%f.$FileTypeExtension' -r ../images
../images is the variable part
Thanks in advance
Re: Exiftool Command from ButtonBar
Maybe use full path with quotes to the exiftool exe.
What is that command supposed to do?
Can you explain us the single parts of that command.
What is that command supposed to do?
Can you explain us the single parts of that command.
- fidofido300
- Junior Member
- Posts: 28
- Joined: 2003-07-28, 16:55 UTC
Re: Exiftool Command from ButtonBar
Change the file extension of all files under ../images folder according to their MIME type recursively.
-ext extention of file
'*' : all Files
'-Filename<%f.FileTypeExtension' Change filename extension
-r recursively
../images %P in Total Commander
-ext extention of file
'*' : all Files
'-Filename<%f.FileTypeExtension' Change filename extension
-r recursively
../images %P in Total Commander
Re: Exiftool Command from ButtonBar
Is %f an ExifTool parameter? If so, double the percent signs because %f is also a TC placeholder. Press F1 when editing a button to see all other placeholders.
Generally it's a good idea to add a question mark at the start of the parameters field when a button doesn't seem to work properly. This makes TC show a confirmation dialog with all own placeholders already replaced (before the command is actually executed).
Generally it's a good idea to add a question mark at the start of the parameters field when a button doesn't seem to work properly. This makes TC show a confirmation dialog with all own placeholders already replaced (before the command is actually executed).
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Exiftool Command from ButtonBar
Also, the "<" sign can be get misinterpreted,
Maybe better to write your command into a batch file and call that from the TC button, to keep TC as interpreter out of the job.
Maybe better to write your command into a batch file and call that from the TC button, to keep TC as interpreter out of the job.
Re: Exiftool Command from ButtonBar
2fidofido300
Try and put only exiftool.exe (with full path in the Command field. And then put the rest in the Parameters field - and if %f is an exiftool parameter then use %%f as also said by Dalai.
So:
Command: drive:\path\exiftool.exe
Parameters: -ext '*' '-FileName<%%f.$FileTypeExtension' -r ../images "%P"
When %P is used alone, TC does not put quotes automatically if there are spaces in the path - hence "%P".
Try and put only exiftool.exe (with full path in the Command field. And then put the rest in the Parameters field - and if %f is an exiftool parameter then use %%f as also said by Dalai.
So:
Command: drive:\path\exiftool.exe
Parameters: -ext '*' '-FileName<%%f.$FileTypeExtension' -r ../images "%P"
When %P is used alone, TC does not put quotes automatically if there are spaces in the path - hence "%P".
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- fidofido300
- Junior Member
- Posts: 28
- Joined: 2003-07-28, 16:55 UTC
Re: Exiftool Command from ButtonBar
Thank you for your replies
I have tried all the advice but I have not managed to get the solution. command works at the cmd or pwsh but even using batch file its not working.
and its executed very rapidly so I can't see the error.
I have tried all the advice but I have not managed to get the solution. command works at the cmd or pwsh but even using batch file its not working.
and its executed very rapidly so I can't see the error.
Re: Exiftool Command from ButtonBar
Start the batch file with cmd /k yourbatchfidofido300 wrote: 2024-07-21, 13:11 UTC Thank you for your replies
I have tried all the advice but I have not managed to get the solution. command works at the cmd or pwsh but even using batch file its not working.
and its executed very rapidly so I can't see the error.
and you see what happens without any timing.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
- fidofido300
- Junior Member
- Posts: 28
- Joined: 2003-07-28, 16:55 UTC
Re: Exiftool Command from ButtonBar
Thank You
Solved
rename.bat
delete Echo On and Pause
Solved
Code: Select all
TOTALCMD#BAR#DATA
"C:\Program Files\totalcmd\Addons\Utils\exiftool\rename.bat"
%P%N
C:\Program Files\totalcmd\Addons\Utils\exiftool\exiftool.exe
Set all images to their MIME type by fidofido300
"C:\Program Files\totalcmd\Addons\Utils\exiftool\
-1
-1
Code: Select all
echo ON
"c:\Program Files\totalcmd\Addons\Utils\exiftool\exiftool.exe" -ext "*" "-FileName<%%f.$FileTypeExtension" -r %1 %2
pause
Re: Exiftool Command from ButtonBar
You only need to double the percent signs when the parameter is specified in TC's parameters field. It doesn't need to be doubled in TC's command field or within a batch file.
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Exiftool Command from ButtonBar
2fidofido300
This is done like this:
This is done like this:
Code: Select all
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Addons\Utils\exiftool\exiftool.exe "-FileName<%f.$FileTypeExtension" -q -r
%V
Addons\Utils\exiftool\exiftool.exe
Fix the extensions of all images in the folder structure under the cursor
1
Overquoting is evil! 👎
- fidofido300
- Junior Member
- Posts: 28
- Joined: 2003-07-28, 16:55 UTC
Re: Exiftool Command from ButtonBar
@Dalai
Double percent is according to exiftool documentation. Apparently its needs to be doubled in batch files.
2Fla$her
Your version works on single files. I want to process folders.
Thank you both
Double percent is according to exiftool documentation. Apparently its needs to be doubled in batch files.

2Fla$her
Your version works on single files. I want to process folders.

Thank you both
Re: Exiftool Command from ButtonBar
2fidofido300
If there is a folder under the cursor, then the button works as described in the tooltip.
If you want the work to be done in the active panel folder, replace %V with a dot (it can be moved to the end of the first field).
If there is a folder under the cursor, then the button works as described in the tooltip.
If you want the work to be done in the active panel folder, replace %V with a dot (it can be moved to the end of the first field).
Overquoting is evil! 👎