(Also posted in the BugTracker)
Please add a feature to return the MD5 checksum of a file.
Example: GetFileCRC>c:blahblah.dat,result
Thanks. :-]
CRC of a file (or string)
Moderators: JRL, Dorian (MJT support)
Captive,
I agree an MD5 checksum function would be nice. Until it is available here is a possible alternative. It requires a free utility file called MD5sums.exe available for download from here.
http://www.pc-tools.net/win32/md5sums/
It can be run from a DOS command line and the output redirected to a file. Therefore the results can be assigned to a variable within MS. Here is a sample script that will use md5sums.exe and display the filename and results.
IfFileExists>%TEMP_DIR%~md5sum~.tmp
DeleteFile>%TEMP_DIR%~md5sum~.tmp
EndIf
input>fname,file to view MD5 checksum...
Let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run>cmd /c C:\util\md5sums.exe %fname% > %TEMP_DIR%~md5sum~.tmp
ReadLn>%TEMP_DIR%~md5sum~.tmp,9,line
midstr>line,48,32,chksum
DeleteFile>%TEMP_DIR%~md5sum~.tmp
MDL>MD5 checksum for %fname%%CRLF%%CRLF%%chksum%
Hope this is helpful,
Dick
I agree an MD5 checksum function would be nice. Until it is available here is a possible alternative. It requires a free utility file called MD5sums.exe available for download from here.
http://www.pc-tools.net/win32/md5sums/
It can be run from a DOS command line and the output redirected to a file. Therefore the results can be assigned to a variable within MS. Here is a sample script that will use md5sums.exe and display the filename and results.
IfFileExists>%TEMP_DIR%~md5sum~.tmp
DeleteFile>%TEMP_DIR%~md5sum~.tmp
EndIf
input>fname,file to view MD5 checksum...
Let>RP_WAIT=1
Let>RP_WINDOWMODE=2
Run>cmd /c C:\util\md5sums.exe %fname% > %TEMP_DIR%~md5sum~.tmp
ReadLn>%TEMP_DIR%~md5sum~.tmp,9,line
midstr>line,48,32,chksum
DeleteFile>%TEMP_DIR%~md5sum~.tmp
MDL>MD5 checksum for %fname%%CRLF%%CRLF%%chksum%
Hope this is helpful,
Dick