I'm really only interested in the CRC32 to use for checking the validity of the files against a database.
Here's some code I put together that uses 7za.exe to display information about files in an archive...
I'm using RegExMatch to pick and choose the values I want to see. The example below is showing the filenames within a zip archive.
I'm not sure how to go about this...
Code: Select all
#SingleInstance, Force
DetectHiddenWindows, On
Run, %ComSpec% /K,, Hide UseErrorLevel, cPid
WinWait, ahk_pid %cPid%,, 10
DllCall("AttachConsole", "UInt", cPid)
hCon := DllCall("CreateFile", "Str", "CONOUT$", "UInt", 0xC0000000, "UInt", 7, "UInt", 0, "UInt", 3, "UInt", 0, "UInt", 0)
Contents := RunWaitOne("7za l -slt ""TEST.zip""")
Pos := 0
While (Pos := RegExMatch(Contents, "Path\s=\s(.*)", Match, Pos + 1)) {
If (A_Index = 1) {
Continue
}
MsgBox, % Match1
}
RunWaitOne(Command) {
Shell := ComObjCreate("WScript.Shell")
Exec := Shell.Exec(ComSpec " /C " Command)
return Exec.StdOut.ReadAll()
}
DllCall("Kernel32.dll\CloseHandle", "UInt", hCon)
DllCall("Kernel32.dll\FreeConsole")
Process, Close, %cPid%