Generate and send checksums of files to clipboard only
Moderators: white, Hacker, petermad, Stefan2
Generate and send checksums of files to clipboard only
Hi.
I'm trying to hash some files grabbing their names from a temp file, %L, (inside the temp file there are the selected files from the file pane) with hashmycalc from nirsoft.
I'm using such program 'cause I want to send the file's hashes to clipboard only (in the second step, ctrl-c of selected files/hash from hashmycalc's window). It seems that TC doesn't support such feature, so:
Command: %commander_path%\utils\HashMyFiles\HashMyFiles.exe
Parameter: /files %L
It doesn't work (the same with /file %L): the program hashes the temp file "CMD1059.tmp" only and not the listed files inside such temp file (I'm using %L and not %S due the characters limit of command line)
How to do that?
Many thanks.
I'm trying to hash some files grabbing their names from a temp file, %L, (inside the temp file there are the selected files from the file pane) with hashmycalc from nirsoft.
I'm using such program 'cause I want to send the file's hashes to clipboard only (in the second step, ctrl-c of selected files/hash from hashmycalc's window). It seems that TC doesn't support such feature, so:
Command: %commander_path%\utils\HashMyFiles\HashMyFiles.exe
Parameter: /files %L
It doesn't work (the same with /file %L): the program hashes the temp file "CMD1059.tmp" only and not the listed files inside such temp file (I'm using %L and not %S due the characters limit of command line)
How to do that?
Many thanks.
HashMyFiles doesn't have an option to read file names from a file !
Look in the readme to understand the meaning of its /file parameter.
You can use tools like TCBL for example to read the list from %L
and create a batch file to run your commands for every file.
https://totalcmd.net/plugring/TCBL_1.02.html
You may also have a look on Nirsofs nircmd with paramsfile.
nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd yourcommand ~$fparam.1$
Look in the readme to understand the meaning of its /file parameter.
You can use tools like TCBL for example to read the list from %L
and create a batch file to run your commands for every file.
https://totalcmd.net/plugring/TCBL_1.02.html
You may also have a look on Nirsofs nircmd with paramsfile.
nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd yourcommand ~$fparam.1$
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
How to translate in tc command mode? I don't know nircmd.Horst.Epp wrote:HashMyFiles doesn't have an option to read file names from a file !
Look in the readme to understand the meaning of its /file parameter.
You can use tools like TCBL for example to read the list from %L
and create a batch file to run your commands for every file.
https://totalcmd.net/plugring/TCBL_1.02.html
You may also have a look on Nirsofs nircmd with paramsfile.
nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd yourcommand ~$fparam.1$
Maybe with:
Command: %commander_path%\utils\nircmd.exe
Parameter: paramsfile "c:\temp\folders.txt" "" "" %commander_path%\utils\HashMyFiles\HashMyFiles.exe %L ~$fparam.1$
My head hurts
Thanks Horst
No I would guess like this:Axis wrote:How to translate in tc command mode? I don't know nircmd.Horst.Epp wrote:HashMyFiles doesn't have an option to read file names from a file !
Look in the readme to understand the meaning of its /file parameter.
You can use tools like TCBL for example to read the list from %L
and create a batch file to run your commands for every file.
https://totalcmd.net/plugring/TCBL_1.02.html
You may also have a look on Nirsofs nircmd with paramsfile.
nircmd.exe paramsfile "c:\temp\folders.txt" "" "" execmd yourcommand ~$fparam.1$
Maybe with:
Command: %commander_path%\utils\nircmd.exe
Parameter: paramsfile "c:\temp\folders.txt" "" "" %commander_path%\utils\HashMyFiles\HashMyFiles.exe %L ~$fparam.1$
My head hurts
Thanks Horst
Parameter: paramsfile "%L" "" "" execmd %commander_path%\utils\HashMyFiles\HashMyFiles.exe ~$fparam.1$
Look into the help for the Nircmd.
It contains some example like this:
paramsfile [Parameters File] [Delimiters]
[NirCmd Command]
This powerfull command allows you to execute NirCmd Command multiple times, by loading one or more parameters from a text file. The text file can be comma-delimited, tab-delimited, semicolon-delimited, or delimited by any char that you specify in [Delimiters] parameter.
Here's an example... Let's say that you have the following text file, containing user names and passwords, delimited by comma:
user01, 123456
user02, abcfg
user03, 5fr23
user04, 33333
The following NirCmd commands sequence will create 4 users with the specified user-names and passwords (by using 'net user' command provided by Windows 2000/XP operating system)
nircmd.exe paramsfile "c:\temp\users.txt" "," "" execmd net user ~$fparam.1$ ~$fparam.2$ /add
The ~$fparam.1$ specifies the first entry in each line - the user name. The ~$fparam.2$ specifies the second entry in each line - the password.
Examples:
paramsfile "c:\temp\folders.txt" "" "" execmd md ~$fparam.1$
paramsfile "c:\temp\shortcuts.txt" "," "~q" shortcut ~$fparam.1$ "~$folder.desktop$" ~$fparam.2$
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
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
By the way, your Windows box should have the clip command available (just enter "clip /?" in a command shell). This command can be used to redirect console output into the clipboard.
In your case, you could write a batch file in which you call your CRC tool and let it write the CRCs into a crc file which is then again piped into the clipboard using "clip". Finally, as last command in the batch file should remove the crc file. Voila...
In your case, you could write a batch file in which you call your CRC tool and let it write the CRCs into a crc file which is then again piped into the clipboard using "clip". Finally, as last command in the batch file should remove the crc file. Voila...
-
- Power Member
- Posts: 872
- Joined: 2013-09-04, 14:07 UTC
As a follow up to my last post, a batch file using "clip" could be very simple; something similar to this pseudo-code example:
(My code sample here is untested and unverified. It might contain typing errors. Beware! )
Code: Select all
@set TempCrcFile=crc_%time::=.%.temp
@set TempCrcFile="%temp%\%TempCrcFile:,=.%"
@MyCrcTool.exe <allTheFilesFromTheList> %TempCrcFile%
@type %TempCrcFile% | clip
@del /q %TempCrcFile%
Re: Generate and send checksums of files to clipboard only
to use /files with hash my files you need to use the %P%S to have sequence of file and not a fileilst file.Axis wrote:Hi.
I'm trying to hash some files grabbing their names from a temp file, %L, (inside the temp file there are the selected files from the file pane) with hashmycalc from nirsoft.
I'm using such program 'cause I want to send the file's hashes to clipboard only (in the second step, ctrl-c of selected files/hash from hashmycalc's window). It seems that TC doesn't support such feature, so:
Command: %commander_path%\utils\HashMyFiles\HashMyFiles.exe
Parameter: /files %L
It doesn't work (the same with /file %L): the program hashes the temp file "CMD1059.tmp" only and not the listed files inside such temp file (I'm using %L and not %S due the characters limit of command line)
How to do that?
Many thanks.
this is a bat you can do
Code: Select all
program : hash_to_clip.bat
parameters: %P%S
-- file hash_to_clip.bat
@<PATH-TO>hashmyfiles /files %* /stext %TEMP%\hash.clip && clip <%TEMP%\hash.clip && del /f %TEMP%\hash.clip
with tcbl, you can use 32bit wdx to hash your file and build your own text output format.