panprzestworzy Posted March 12, 2013 Posted March 12, 2013 Hello I try to divide my archive in small (500k) pieces. Already I have: #include <7zip.au3> #include #include $hWnd = 0 $sArcName = "archive_file.7z" $sFileName = "file_to_pack.7z" $sHide = 0 $sCompress = 5 $sRecurse = 1 $sIncludeFile = 0 $sExcludeFile = 0 $sPassword = 0 $sSFX = 0 $sVolume = 0 $sWorkDir = 0 $retResult = _7ZipAdd($hWnd, $sArcName, $sFileName, $sHide, $sCompress, $sRecurse, $sIncludeFile, $sExcludeFile, $sPassword, $sSFX, $sVolume, $sWorkDir) above script packs my file in one big "archive_file.7z" but when i try to set "$sVolume = 512k" scripts starts and ends with a second. What form $sVolume should have?
computergroove Posted March 12, 2013 Posted March 12, 2013 I have looked at the 7zip.au3 file - October 18 2012 and I do not see an option for packet size. What au3 are you using? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
panprzestworzy Posted March 12, 2013 Author Posted March 12, 2013 I couldn't find attach option so: I'm using this part of 7zip.au3 file: expandcollapse popup; #FUNCTION# ==================================================================================================================== ; Name...........: _7ZipAdd ; Description ...: Adds files to archive ; Syntax.........: _7ZipAdd($hWnd, $sArcName, $sFileName[, $sHide = 0[, $sCompress = 5[, $sRecurse = 1[, $sIncludeFile = 0[, _ ; $sExcludeFile = 0[, $sPassword = 0[, $sSFX = 0[, $sVolume = 0[, $sWorkDir = 0]]]]]]]]]) ; Parameters ....: $hWnd - Handle to parent or owner window ; $sArcName - Archive file name ; $sFileName - File names to archive up ; $sHide - Use this switch if you want the CallBack function to be called ; $sCompress - Compress level 0-9 ; $sRecurse - Recursion method: 0 - Disable recursion ; 1 - Enable recursion ; 2 - Enable recursion only for wildcard names ; $sIncludeFile - Include filenames, specifies filenames and wildcards or list file that specify processed files ; $sExcludeFile - Exclude filenames, specifies what filenames or (and) wildcards must be excluded from operation ; $sPassword - Specifies password ; $sSFX - Creates self extracting archive [b]; $sVolume - Specifies volumes sizes[/b] ; $sWorkDir - Sets working directory for temporary base archive ; Return values .: Success - Returns the string with results ; Failure - Returns 0 and and sets the @error flag to 1 ; Author ........: R. Gilman (rasim) ; =============================================================================================================================== Func _7ZipAdd($hWnd, $sArcName, $sFileName, $sHide = 0, $sCompress = 5, $sRecurse = 1, $sIncludeFile = 0, $sExcludeFile = 0, _ $sPassword = 0, $sSFX = 0, $sVolume = 0, $sWorkDir = 0) $sArcName = '"' & $sArcName & '"' $sFileName = '"' & $sFileName & '"' Local $iSwitch = "" If $sHide Then $iSwitch &= " -hide" $iSwitch &= " -mx" & $sCompress $iSwitch &= _RecursionSet($sRecurse) If $sIncludeFile Then $iSwitch &= _IncludeFileSet($sIncludeFile) If $sExcludeFile Then $iSwitch &= _ExcludeFileSet($sExcludeFile) If $sPassword Then $iSwitch &= " -p" & $sPassword If FileExists($sSFX) Then $iSwitch &= " -sfx" & $sSFX If $sVolume Then $iSwitch &= " -v" & $sVolume If $sWorkDir Then $iSwitch &= " -w" & $sWorkDir Local $tOutBuffer = DllStructCreate("char[32768]") Local $aRet = DllCall($hDLL_7ZIP, "int", "SevenZip", _ "hwnd", $hWnd, _ "str", "a " & $sArcName & " " & $sFileName & " " & $iSwitch, _ "ptr", DllStructGetPtr($tOutBuffer), _ "int", DllStructGetSize($tOutBuffer)) If Not $aRet[0] Then Return SetError(0, 0, DllStructGetData($tOutBuffer, 1)) Return SetError(1, 0, 0) EndFunc ;==>_7ZipAdd I've bolded volmes size
computergroove Posted March 22, 2013 Posted March 22, 2013 Rather than using the au3 file you could just download a version of 7 zip and use things like pixelgetcolor and 'do until' strings to complete the end result you were looking for. Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now