User Command for hashing console programs

English support forum

Moderators: white, Hacker, petermad, Stefan2

Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: User Command for hashing console programs

Post by *Axis »

Like I said, here works with absolute paths only:

Command: c:\tc\utils\lst2mlt\lst2mlt.exe

Parameters: /X:"c:\tc\utils\DirHash\DirHash.exe" /L:"%L"

It works
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: User Command for hashing console programs

Post by *hi5 »

Yes of course that works, do you see the difference?

Code: Select all

      utils\lst2multi\lst2mlt.exe
c:\tc\utils\lst2mlt\lst2mlt.exe
\lst2multi\ v \lst2mlt\

Edit: my bad, my path was lst2multi :oops:
Last edited by hi5 on 2021-06-04, 21:46 UTC, edited 2 times in total.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: User Command for hashing console programs

Post by *Axis »

My path to lst2mlt.exe is utils\lst2mlt\ NOT utils\lst2multi\
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: User Command for hashing console programs

Post by *hi5 »

Are you sure you don't have a space before " utils\" because if the full path works just "utils\" will to. There must be a typo, can't help you further.
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: User Command for hashing console programs

Post by *Axis »

hi5 wrote: 2021-06-04, 21:36 UTC Are you sure you don't have a space before " utils\" because if the full path works just "utils\" will to. There must be a typo, can't help you further.
Super-sure (I've retested)

Thanks (maybe a bug in 9.22?)
hi5
Power Member
Power Member
Posts: 551
Joined: 2012-11-03, 11:35 UTC
Contact:

Re: User Command for hashing console programs

Post by *hi5 »

No as I've just tested it. What is in your start path? "c:\totalcmd\" in mine. If you copy this and paste it in your buttonbar to replace the one you have (do check paths as I've typed it here)

Code: Select all

TOTALCMD#BAR#DATA
utils\lst2mlt\lst2mlt.exe
/X:"utils\DirHash\DirHash.exe" /L:"%L"
c:\totalcmd\TOTALCMD.EXE,3

c:\totalcmd\

-1
F4MiniMenu (Forum) - Open selected file(s) from TC in defined editor(s) - A (minimalistic) clone of F4Menu
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
User avatar
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: User Command for hashing console programs

Post by *Dalai »

2Axis
When providing environment variables (with double percent signs) in the Parameters field, TC doesn't expand them, so it's the launched program's job to do so. Apparently, lst2mlt doesn't have such feature. Provide the parameters in the Command field instead and it should work.

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
User avatar
petermad
Power Member
Power Member
Posts: 14807
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: User Command for hashing console programs

Post by *petermad »

2Axis

Try this instead:

Command: "%commander_path%\utils\lst2mlt\lst2mlt.exe" /X:"%commander_path%\utils\DirHash\DirHash.exe"
Parameters: /L:"%L"
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Axis
Junior Member
Junior Member
Posts: 88
Joined: 2015-07-14, 18:53 UTC

Re: User Command for hashing console programs

Post by *Axis »

petermad wrote: 2021-06-04, 22:56 UTC 2Axis

Try this instead:

Command: "%commander_path%\utils\lst2mlt\lst2mlt.exe" /X:"%commander_path%\utils\DirHash\DirHash.exe"
Parameters: /L:"%L"
It works! (I guess for the explanation given by Dalai) :o
I have to mark these tips&tricks and hang to the wall :mrgreen:

Thanks a lot to everyone :!:
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: User Command for hashing console programs

Post by *solid »

AFIAK, TC doesn't support envars in parameters filed.

%C in parameters field passes the name of the file that is under the cursor.

So %COMMANDER_PATH% actually gets parsed as filename.extOMMANDER_PATH, supposing the cursor is on the filename.ext
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6489
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: User Command for hashing console programs

Post by *Horst.Epp »

solid wrote: 2021-06-05, 14:09 UTC AFIAK, TC doesn't support envars in parameters filed.

%C in parameters field passes the name of the file that is under the cursor.

So %COMMANDER_PATH% actually gets parsed as filename.extOMMANDER_PATH, supposing the cursor is on the filename.ext
You simply have to double the % in this case
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: User Command for hashing console programs

Post by *solid »

Horst.Epp wrote: 2021-06-05, 14:21 UTC
solid wrote: 2021-06-05, 14:09 UTC AFIAK, TC doesn't support envars in parameters filed.

%C in parameters field passes the name of the file that is under the cursor.

So %COMMANDER_PATH% actually gets parsed as filename.extOMMANDER_PATH, supposing the cursor is on the filename.ext
You simply have to double the % in this case
That will pass the literal string as parametar, it will not expand it.
User avatar
Dalai
Power Member
Power Member
Posts: 9388
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: User Command for hashing console programs

Post by *Dalai »

2solid
See my explanation above: https://www.ghisler.ch/board/viewtopic.php?p=402502#p402502

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
User avatar
solid
Power Member
Power Member
Posts: 747
Joined: 2004-08-09, 11:20 UTC

Re: User Command for hashing console programs

Post by *solid »

Dalai wrote: 2021-06-05, 15:50 UTC 2solid
See my explanation above: https://www.ghisler.ch/board/viewtopic.php?p=402502#p402502

Regards
Dalai
The bottom line is that environmental variables are not supported in the parameters field. They are not expanding to their values.
We agree on this, don't we?

But I don't agree that we should expect from external programs to expand TC's internal variables, even if the programs are written for TC itself.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6489
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: User Command for hashing console programs

Post by *Horst.Epp »

solid wrote: 2021-06-05, 15:59 UTC
Dalai wrote: 2021-06-05, 15:50 UTC 2solid
See my explanation above: https://www.ghisler.ch/board/viewtopic.php?p=402502#p402502

Regards
Dalai
The bottom line is that environmental variables are not supported in the parameters field. They are not expanding to their values.
We agree on this, don't we?

But I don't agree that we should expect from external programs to expand TC's internal variables, even if the programs are written for TC itself.
For any external program which is started from TC there is no difference between TC internal variables
and any other, they can all be expanded if the program does it at all.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1372a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Post Reply