User Command for hashing console programs
Moderators: white, Hacker, petermad, Stefan2
User Command for hashing console programs
Hi to all.
Since TC10 won't have the new hashing algorithms (XXH3, Blake3) I need, I'm trying to create my own user command (to put in the start menu).
Unfortunately, the hash programs I use do not accept the %L parameter as input, so they hash the temp file (instead of hashing Its content).
I would like to get a behavior like TC's native hashing, so:
- Select files, folders (with other files inside them), etc., in TC.
- Run the user command that in turn invokes the hashing program to generate the hashing of everything has been selected by the user (exactly as tc does with Its native hashing algorithms like md5, crc32, sha-x, etc.).
Any idea (yep, to me is very difficult. I was hoping for tc10)?
Many thanks.
Since TC10 won't have the new hashing algorithms (XXH3, Blake3) I need, I'm trying to create my own user command (to put in the start menu).
Unfortunately, the hash programs I use do not accept the %L parameter as input, so they hash the temp file (instead of hashing Its content).
I would like to get a behavior like TC's native hashing, so:
- Select files, folders (with other files inside them), etc., in TC.
- Run the user command that in turn invokes the hashing program to generate the hashing of everything has been selected by the user (exactly as tc does with Its native hashing algorithms like md5, crc32, sha-x, etc.).
Any idea (yep, to me is very difficult. I was hoping for tc10)?
Many thanks.
Re: User Command for hashing console programs
If your Hash program supports multiple files/dirs in the command line then you could try and use the %S parameter.
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
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
Re: User Command for hashing console programs
I'm trying with dirhash, it doesn't work (with %S, %L, etc.).
Re: User Command for hashing console programs
If your hash program doesn't support list files (or multiple parameters like %S provides), you're going to need some kind of loop that calls the hash program for every file. This will impact performance a lot because the forking of processes is expensive in terms of resources (CPU load).
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
Re: User Command for hashing console programs
You can use the tool List To MultiInstance (Lst2Multi)
https://www.ghisler.com/dtools.htm
It will of course take some time for a large number of files.
https://www.ghisler.com/dtools.htm
It will of course take some time for a large number of files.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3672)
TC 11.03 x64 / x86
Everything 1.5.0.1378a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1378a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: User Command for hashing console programs
The program supports stdin as input ("When no filename provided or when '-' is provided, uses stdin as input."): could it help that?
Re: User Command for hashing console programs
Thanks, I'll tryHorst.Epp wrote: ↑2021-05-31, 15:22 UTC You can use the tool List To MultiInstance (Lst2Multi)
https://www.ghisler.com/dtools.htm
It will of course take some time for a large number of files.
(but it's a pain in the ass: tc really starts to irritate me)
Re: User Command for hashing console programs
As i can see, the program (if it is this one https://github.com/idrassi/DirHash/releases/tag/DirHash_1.18.0) only supports one parametar as the name of the file or dir. It doesn't even support wildcards.
It is a limitation of the program, not TC.
For handling such situation there is Lst2Multi as @Horst.Epp suggested. Use it to send all the filenames to it and the Lst2Multi will run the external program as many times as necessary, each time with another single filename.
F4Menu has the same functionality, although it is not its main purpose.
It is a limitation of the program, not TC.
For handling such situation there is Lst2Multi as @Horst.Epp suggested. Use it to send all the filenames to it and the Lst2Multi will run the external program as many times as necessary, each time with another single filename.
F4Menu has the same functionality, although it is not its main purpose.
Re: User Command for hashing console programs
I was referring ("tc really starts to irritate me") to being forced to non-native solutions for something that could be quickly (maybe) inserted into TC (at least put one between Blake3 or Xxh3).
It doesn't support Internal TC variables (I tried with %commander_path% and %commander_drive%), so goodbye tc's portability
Re: User Command for hashing console programs
Sorry thats nonsense.
TC starts the lst2mlt.exe with a button you define
and of course TC knows about %COMMANDER_PATH% and its other variables.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3672)
TC 11.03 x64 / x86
Everything 1.5.0.1378a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
TC 11.03 x64 / x86
Everything 1.5.0.1378a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
Re: User Command for hashing console programs
TC 9.22 x64, Start menu:
Command: "%commander_path%\utils\lst2mlt\lst2mlt.exe"
Parameters: /X:"%commander_path%\utils\DirHash\DirHash.exe" /L:"%L"
https://imgur.com/uBZQ7tS
Re: User Command for hashing console programs
2Axis
You have to double the percent signs (of environment variables) in the Parameters field because letters prefixed by a single percent sign are considered placeholders by TC, like %C, %P, %N and so on. When supplying the parameters within the Command field, the percent signs don't need to be doubled.
Regards
Dalai
You have to double the percent signs (of environment variables) in the Parameters field because letters prefixed by a single percent sign are considered placeholders by TC, like %C, %P, %N and so on. When supplying the parameters within the Command field, the percent signs don't need to be doubled.
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
Re: User Command for hashing console programs
I triedDalai wrote: ↑2021-06-04, 16:53 UTC 2Axis
You have to double the percent signs (of environment variables) in the Parameters field because letters prefixed by a single percent sign are considered placeholders by TC, like %C, %P, %N and so on. When supplying the parameters within the Command field, the percent signs don't need to be doubled.
-------------------
Command: "%commander_path%\utils\lst2mlt\lst2mlt.exe"
Parameters: /X:"%%commander_path%%\utils\DirHash\DirHash.exe" /L:"%L"
-------------------
Not working ("Windows cannot find '%commander_path%\utils\DirHash\DirHash.exe'. Make sure you typed the name correctly, and then try again.").
Thanks
Re: User Command for hashing console programs
Try
Command: utils\lst2multi\lst2mlt.exe
parameters: /X:"utils\DirHash\DirHash.exe" /L:"%L"
you probably don't need %commander_path% is it is relative to the TC anyway. (works here)
Command: utils\lst2multi\lst2mlt.exe
parameters: /X:"utils\DirHash\DirHash.exe" /L:"%L"
you probably don't need %commander_path% is it is relative to the TC anyway. (works here)
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)
Source at GitHub (AutoHotkey). TCSyncComments (copy file comments)
Re: User Command for hashing console programs
It doesn't work: "Windows cannot find 'utils\lst2mlt\lst2mlt.exe'. Make sure you typed the name correctly, and then try again."
Thanks
Edit: replace "lst2multi" with "lst2mlt"