Ok im doing some extraction of archives like this
AutoIt Code
$aRarFile = _RecFileListToArray(@ScriptDir, "*.rar|*.part*", 1, 0) ;~ _ArrayDisplay($aRarFile, ".Rar Files") If IsArray($aRarFile) Then $FileEnd = StringTrimLeft(_ArrayToString($aRarFile), 2) $test = RunWait(@ComSpec & ' /c ' & @TempDir & '\7z.exe' & ' x -y ' & '"' & $FileEnd & '"', "", @SW_HIDE) Sleep(2000) Else MsgBox(64, "Error " & @error, "No Rar Files To Unpack") EndIf
And im wanting to make a progress output so i can update a toast.
I was looking at this as a starting point.
AutoIt Code
Func _CopyFolder($sSourceFolder, $sDestFolder) Local $ipct DirRemove($sDestFolder, 1) Local $iSourceSize = DirGetSize($sSourceFolder), $iDestSize Local $pid = Run(@AutoItExe & ' /AutoIt3ExecuteLine "DirCopy(''' & $sSourceFolder & ''', ''' & $sDestFolder & ''')"') Do GUICtrlSetData($hLabel3, "Checking " & StringReplace($sSourceFolder, @UserProfileDir & "\", "")) $iDestSize = DirGetSize($sDestFolder) $ipct = Int(($iDestSize / $iSourceSize) * 100) GUICtrlSetData($hProgress, $ipct) Sleep(20) Until Not ProcessExists($pid) EndFunc ;==>_CopyFolder
But how can i read the output of something when i dont know how much of the file is still to be unpacked
I saw on here http://www.dotnetperls.com/7-zip-examples
that the L switch can list the size of the files like the image below
http://www.dotnetperls.com/7-zip.png
The figure i would need i guess is this one
31104
maybe that could be used before each pass at the files and use the actual folder size as the start point?
Is it possible to do this? or has something like this been atempted