Thanks jaclaz for the neat script!
@radix Please try to provide an full explanation of what you are trying to achieve, because it isn't possible to tell from the code you've attempted.
I have created a new Topic from your question since it has no specific ties with the one in which you'd posted.
Thanks Yzöwl for creating the new thread!
I want to replace some unwanted characters from an output file that contains hashes for a group of big files.
I used fsum hash utility. Usually, the output looks like this:
; SlavaSoft Optimizing Checksum Utility - fsum 2.52.00337 <www.slavasoft.com>
; Generated on 03/29/15 at 20:45:38
so, it's need some cleaning.
I used a command line like this:
SET WD=D:\New folder
fsum.exe -sha1 -d"%WD%" "files*.7z.*">"%WD%\files.txt" & findstr /v ";" "%WD%\files.txt">"%WD%\files.sha1" & del /f /q "%WD%\files.txt"
The problem was ?SHA1 string.
The fastest (in terms of reading from storage) and cleaner (regarding the output) command line hash utility is hashutils (586 MB/s read speed from a RAID0 array made by two SSDs), but it calculate only crc32, md4, md5 and sha1. I discovered hashutils after exactfile (70 MB/s read speed from RAID0 SSD array), rhash (293 MB/s read speed from RAID0 SSD array), fsum (415 MB/s read speed from RAID0 SSD array), FileVerifier++ (386 MB/s read speed from RAID0 SSD array), powershell v4 (515 MB/s read speed from RAID0 SSD array), fciv (468 MB/s read speed from RAID0 SSD array), AutoIt _Crypt_HashFile function (175 MB/s read speed from RAID0 SSD array) and checksum from corz.org (440 MB/s read speed from RAID0 SSD array, but it's not exactly a command line utility, needing some ini file stored in %AppData% and if not find it, generate unwanted pop-ups, including opening the default web browser on their website).
From the above tools it's safe to ignore exactfile and checksum from corz.org.
Rhash support the largest number of hashes and can output in the command prompt window the calculation progress in percents, but can't use the advantage of a RAID0 array.
Edited by radix, Today, 06:42 AM.