@Teddy
Nice little Dll. As md5'ing lots of files usually takes a lot of time I decide to knock up a quick little gui with Progress etc. etc.
Here's the code. Might save somebody some time
Code:
;; ---------------------------------------------------------------------
;; ----------- A little gui using teddy's md5lib.dll -------------
;; ---------------------------------------------------------------------
Gui, Add, Progress, x16 y40 w310 h10 c00aa00 -smooth vDoingIt,0
Gui, Add, Text, x16 y10 w210 h20,Teddy's MD5 Checksum calculator.
Gui, Add, Button, x236 y10 w90 h20 gDoit,Load Files.
Gui, Add, Text, x16 y60 w310 h40 +Center vMessage,
Gui, Show, x272 y114 h102 w343, Generated with SmartGUI Creator
Return
GuiClose:
ExitApp
Doit:
maxsize =0.0
currsize = 0.0
f_count = 0
st := a_tickcount
FileSelectFolder, Path
guicontrol,,message,Loading ..... ;; just in case there's lots
Loop, %Path%\*.*, , 1
{
MaxSize := MaxSize + A_LoopFileSize
F_count++
}
hModule := DllCall("LoadLibrary", "str", "MD5Lib.dll")
Loop, %Path%\*.*, , 1
{
CurrSize := CurrSize + A_LoopFileSize
DllCall("MD5Lib\hexMD5", str, md5sum, str, A_LoopFileFullPath)
FileAppend, %md5sum%`t%A_LoopFileFullPath%`n, %A_Desktop%\MD5Sums.txt
done := currsize/maxsize * 100
show := round(done)
guicontrol,,doingit,%show%
guicontrol,,Message,%show% `%
}
DllCall("FreeLibrary", "UInt", hModule)
en := (a_tickcount - st)/1000
guicontrol,,message,Finished Processing %f_count% Files ...`nIn %en% Seconds !
return
Thanx.
Dave