Sorry if something similar has been asked before.
I'm trying to create a Total Commander user command that passes two selected files to an executable (in my case 'meld' application).
I want to be able to send two filenames together with their path, regardless of whether they are in source and/or target panel, but I just can't manage to do so.
So, for example, using these parameters:
P%S %T%R
if one of the files is in the source and one in the target panel, then it works fine.
But if the two selected files (in red) are only in the source panel, then Total Commander sends these two files AND the file that is under the cursor in the target panel (even though this last file is not selected).
Please, is there a way to do what I intend?
Thanks!
User command to pass two file names to external executable
Moderators: white, Hacker, petermad, Stefan2
%P%S2 should do what you want (you may need to quote the whole thing if TC doesn't do so).
Regards
Dalai
Regards
Dalai
#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
But if the two files I have selected (and want to send to external program) are in different panels, i.e. one is in source panel and the other is in target panel, that won't work.
I'm looking for a way to send any selected files and their paths to the external program.
So, for example:
- if I have two files selected in source panel, it would send those.
- if I have one file selected in source panel and one selected in target panel, it would send both (with their respective paths).
I'm looking for a way to send any selected files and their paths to the external program.
So, for example:
- if I have two files selected in source panel, it would send those.
- if I have one file selected in source panel and one selected in target panel, it would send both (with their respective paths).
Since there is no differentiation between selection of files and the file under the cursor (in case nothing is selected) I don't think it's possible. You can either create two buttons - one button for selection in one panel and one button for selection on both panels - or use one button with %P%S2 to use the files in the source panel only.
Maybe someone has a better idea.
Regards
Dalai
Maybe someone has a better idea.
Regards
Dalai
#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
- sqa_wizard
- Power Member
- Posts: 3864
- Joined: 2003-02-06, 11:41 UTC
- Location: Germany
For this special case there is no need of a user command.... user command that passes two selected files to an executable (in my case 'meld' application).
"Meld" is a file compare tool.
Just add a line to your wincmd.ini (assumed the file is meld.exe)
Code: Select all
[Configuration]
CompareTool="Put\in\your\path\meld.exe"
Note:
I added some shortcuts for this:
Code: Select all
[Shortcuts]
A+C=cm_CompareFilesByContent
AS+C=cm_IntCompareFilesByContent
With Shift-Alt-C compare with TC internal compare
#5767 Personal license
BTW, there is a way of creating buttonbar button that will accept the same files that internal comparer opens, there are some special parameters:
This allows creating multiple buttons/commands for different compare tools.Help wrote:%C1 Like the first parameter of "Compare by content": First selected file, or file under cursor
%C2 Like the second parameter of "Compare by content": Second selected file, or first selected in target panel, or file with same name in target panel. Note: If the right panel is active and less than 2 files are selected, %C1 and %C2 will be reversed.