rasim Posted November 27, 2008 Share Posted November 27, 2008 (edited) Hi everyone!Ok, after searching for any solution about works with 7Zip archives I found this interesting topic with several examples. And within several days I have written this UDF Main features:Over 27 functions!7z, zip, gzip, bzip2, tar archive types support.Archive encrypt/decrypt support.Archive include/exclude support.Files include/exclude support.SFX archives support.Multivolume archives support.Archive checking support.Compressing method 0-9.3 recursion method.Deleting files from archive.Updating archives files.Searching in the archive.DLL Call-back function (for using the 7-zip32.dll with your GUI)Retrieve the archive files date/time.Retrieve the archive files compressed/uncompressed size.Retrieve archives compressing ratio.Retrieve archives CRC.Retrieve the archive file count.And more...7zip_udf.zip Edited January 26, 2009 by rasim logmein 1 Link to comment Share on other sites More sharing options...
Zedna Posted November 27, 2008 Share Posted November 27, 2008 Not tested yet but from examples sources it look VERY GOOOOD! Thanks for sharing rasim. 5 stars from me Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Tlem Posted November 27, 2008 Share Posted November 27, 2008 Really more interesting than my update of the original UDF. It's look like more professional and complete. Thank you very much rasim. PS : If you have an idea to do the same thing with the 7za.dll, it will be a great addition. Best Regards.Thierry Link to comment Share on other sites More sharing options...
rasim Posted November 28, 2008 Author Share Posted November 28, 2008 ZednaThank you friend TlemIf you have an idea to do the same thing with the 7za.dllWhat the 7za.dll? You have any information or links about this dll? Link to comment Share on other sites More sharing options...
Valuater Posted November 28, 2008 Share Posted November 28, 2008 Really Nice rasim, Clean Functions also! 8) Link to comment Share on other sites More sharing options...
Tlem Posted November 28, 2008 Share Posted November 28, 2008 Hello rasim, then 7za.dll is the original dll file of 7-zip32.dll.You can find all of it here : http://www.7-zip.org/download.html Best Regards.Thierry Link to comment Share on other sites More sharing options...
rasim Posted November 28, 2008 Author Share Posted November 28, 2008 ValuaterThank you sir TlemIf you have an idea to do the same thing with the 7za.dll, it will be a great additionFrom readme.txt7za.dll and 7zxa.dll work via COM interfaces.But these DLLs don't use standard COM interfaces for objects creating.Some discussion about this dll. Link to comment Share on other sites More sharing options...
GEOSoft Posted November 28, 2008 Share Posted November 28, 2008 ValuaterThank you sir Some discussion about this dll.I've never been able to get that 7za.dll working correctly so I usually just install the 7za.exe file.Does your version of the UDF still have that annoying problem where it wants to open the 7Zip GUI? George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
rasim Posted November 28, 2008 Author Share Posted November 28, 2008 Does your version of the UDF still have that annoying problem where it wants to open the 7Zip GUI?It's not a problem. User have a three ways:1. Use the 7-zip32.dll functions with the 7Zip internal GUI dialog.2. Use a hidden method.3. Use your own GUI, all necessary information will be processed by Call-back function (see a _7ZipAdd_Example_using_Callback.au3) Link to comment Share on other sites More sharing options...
GEOSoft Posted November 28, 2008 Share Posted November 28, 2008 It's not a problem. User have a three ways:1. Use the 7-zip32.dll functions with the 7Zip internal GUI dialog.2. Use a hidden method.3. Use your own GUI, all necessary information will be processed by Call-back function (see a _7ZipAdd_Example_using_Callback.au3)The problem is that I don't want any notification or GUI indicating that it's even running so hiding it is the only way. Guess it's still simpler to install the command line version like I do now. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
rasim Posted November 28, 2008 Author Share Posted November 28, 2008 The problem is that I don't want any notification or GUI indicating that it's even running so hiding it is the only way. Guess it's still simpler to install the command line version like I do now.Just use a hidden mode: #include <7Zip.au3> $ArcFile = @ScriptDir & "\myArchive.zip" $FileName = "c:\Program Files\AutoIt3\Examples" If Not FileExists($FileName) Then Exit MsgBox(16, "Error", "File not exists") $retResult = _7ZipAdd(0, $ArcFile, $FileName, 1) If $retResult = 0 Then MsgBox(64, "_7ZipAdd", "Archive created successfully") Else MsgBox(64, "_7ZipAdd", "Error occurred") EndIf Link to comment Share on other sites More sharing options...
ProgAndy Posted November 28, 2008 Share Posted November 28, 2008 (edited) Great UDF, but I found some errors : Spaces are not supported in archive filenameYou should add those lines to each functions wich uses FileName / ArcName.If StringInStr($sFileName, Chr(32)) Then $sFileName = '"' & $sFileName & '"' If StringInStr($sArcName, Chr(32)) Then $sArcName = '"' & $sArcName & '"'(add quotation marks when spaces occur)Also, it should be possible to read the output-buffer, if you want it (add $fReturnLog=False to the end of the func definition and follwing line to the end of the functions: If $fReturnLog Then Return SetExtended($aRet[0],DllStructGetData($OutBuffer)) Edited November 28, 2008 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
GEOSoft Posted November 28, 2008 Share Posted November 28, 2008 (edited) Great UDF, but I found some errors : Spaces are not supported in archive filename You should add those lines to each functions wich uses FileName / ArcName. If StringInStr($sFileName, Chr(32)) Then $sFileName = '"' & $sFileName & '"' If StringInStr($sArcName, Chr(32)) Then $sArcName = '"' & $sArcName & '"'(add quotation marks when spaces occur) Also, it should be possible to read the output-buffer, if you want it (add $fReturnLog=False to the end of the func definition and follwing line to the end of the functions: If $fReturnLog Then Return SetExtended($aRet[0],DllStructGetData($OutBuffer))Better yet. don't bother with the If StringInStr($sArcName, Chr(32)) Just make sure it's quoted anyway. Quotes when not required don't make any difference. Edit: I often use something like $sFilename = StringReplace($sFilename, Chr(32), "_") and then quote it anyway. Edited November 28, 2008 by GEOSoft George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
rasim Posted November 29, 2008 Author Share Posted November 29, 2008 ProgAndyGEOSoftThanks guys! Fixed, updated first post. Link to comment Share on other sites More sharing options...
HAL9000 Posted November 29, 2008 Share Posted November 29, 2008 7z, zip, gzip, bzip2, tar archive types support.support for gz ? Link to comment Share on other sites More sharing options...
Andreik Posted November 29, 2008 Share Posted November 29, 2008 (edited) Nice work rasim! 5 Stars Edited November 29, 2008 by Andreik Link to comment Share on other sites More sharing options...
GEOSoft Posted November 29, 2008 Share Posted November 29, 2008 support for gz ?From the 7Zip siteSupported formats: Packing / unpacking: 7z, ZIP, GZIP, BZIP2 and TAR Unpacking only: RAR, CAB, ISO, ARJ, LZH, CHM, MSI, WIM, Z, CPIO, RPM, DEB and NSIS George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
HAL9000 Posted November 29, 2008 Share Posted November 29, 2008 From the 7Zip sitefrom help file of 7-zipGZIP gz gzip tgz try to decompress this file with 7ziphttp://dl3.antivir-pe.de/upd/vdf/antivir1.vdf.gzI can Link to comment Share on other sites More sharing options...
WeMartiansAreFriendly Posted November 29, 2008 Share Posted November 29, 2008 Very nice rasim Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet() Link to comment Share on other sites More sharing options...
Tlem Posted December 3, 2008 Share Posted December 3, 2008 (edited) Hello rasim.I try to use the function _7ZipGetArcOriginalSize, but it seems that it can't work whithout the function _7ZipOpenArchive and wen I try to use _7ZipOpenArchive, I have all the time an error returned.I try to use your example _7ZipFindFirst__7ZipFindNext_Example.au3, but it doesn't work anymore.Can you point me what I'm doing wrong or forget ? Edited December 3, 2008 by Tlem Best Regards.Thierry Link to comment Share on other sites More sharing options...
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