Bert Posted August 8, 2006 Share Posted August 8, 2006 (edited) I've looked up using the sevenzip.au3 and also tried to use pkzip. No matter how I try to do this, I can not get stuff to unzip. Could someone show me a example of code that will unzip a file? I tried this#include <SevenZip.au3> _SevenZipExtract("C:\test\New Folder.zip", "c:\test\", "*.*")oÝ÷ Økº{ºÙ趧+.8©¥çH¶¸vë"ÊdÚÛazƦzØbZ¦§±«¢+ÙIÕ¹]¥Ð¡ =5MAµÀìÅÕ½Ðì½èÀäÈíÁÕ¹é¥À¹áµµèÀäÈíÑÍÐÀäÈíÑÍйé¥ÀÅÕ½Ðì¤ If someone could correct my example so it would work, that would be great. This is hurting my brain. file location: C:\test\test.zip output location: C:\test\new folder Edited August 8, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
GtaSpider Posted August 8, 2006 Share Posted August 8, 2006 (edited) Hi!i think here you can find a unzip.exe! its great and compact!http://www.mame.net/downmain.html (in bottom of the page)so long spider Edited August 8, 2006 by GtaSpider www.AutoIt.de - Moderator of the German AutoIt Forum Link to comment Share on other sites More sharing options...
/dev/null Posted August 8, 2006 Share Posted August 8, 2006 I've looked up using the sevenzip.au3 and also tried to use pkzip. No matter how I try to do this, I can not get stuff to unzip. what's the content of sevenzip.au3?CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Briegel Posted August 8, 2006 Share Posted August 8, 2006 I've looked up using the sevenzip.au3 and also tried to use pkzip. No matter how I try to do this, I can not get stuff to unzip.I worked with the command line version of 7Zip '7za.exe' without 'sevenzip.au3' and without problems. 7-Zip (A) 4.42 Copyright (c) 1999-2006 Igor Pavlov 2006-05-14 Usage: 7za <command> [<switches>...] <archive_name> [<file_names>...] [<@listfiles...>] <Commands> a: Add files to archive d: Delete files from archive e: Extract files from archive (without using directory names) l: List contents of archive t: Test integrity of archive u: Update files to archive x: eXtract files with full paths <Switches> -ai[r[-|0]]{@listfile|!wildcard}: Include archives -ax[r[-|0]]{@listfile|!wildcard}: eXclude archives -bd: Disable percentage indicator -i[r[-|0]]{@listfile|!wildcard}: Include filenames -m{Parameters}: set compression Method -o{Directory}: set Output directory -p{Password}: set Password -r[-|0]: Recurse subdirectories -scs{UTF-8 | WIN | DOS}: set charset for list files -sfx[{name}]: Create SFX archive -si[{name}]: read data from stdin -slt: show technical information for l (List) command -so: write data to stdout -t{Type}: Set type of archive -v{Size}[b|k|m|g]: Create volumes -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options -w[{path}]: assign Work directory. Empty path means a temporary directory -x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames -y: assume Yes on all queries Link to comment Share on other sites More sharing options...
Briegel Posted August 8, 2006 Share Posted August 8, 2006 what's the content of sevenzip.au3?CheersKurt@/dev/null'SevenZip.au3' you can find here. It uses the '7-zip32.dll'. Link to comment Share on other sites More sharing options...
Bert Posted August 8, 2006 Author Share Posted August 8, 2006 I need a example, not where to look. I do not understand the examples that I did find. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Briegel Posted August 8, 2006 Share Posted August 8, 2006 ; extracts all files from archive test.zip to the current directory RunWait('U:\test\7za.exe e test.zip','',@SW_HIDE) ; extracts all *.jpg files from archive test.zip to c:\image folder RunWait('U:\test\7za.exe e test.zip -oc:\image *.jpg -r','',@SW_HIDE) ; the same with full paths of files RunWait('U:\test\7za.exe x test.zip','',@SW_HIDE) RunWait('U:\test\7za.exe x test.zip -oc:\image *.jpg -r','',@SW_HIDE) Link to comment Share on other sites More sharing options...
/dev/null Posted August 8, 2006 Share Posted August 8, 2006 (edited) I've looked up using the sevenzip.au3 and also tried to use pkzip. No matter how I try to do this, I can not get stuff to unzip. Could someone show me a example of code that will unzip a file? I tried this#include <SevenZip.au3> _SevenZipExtract("C:\test\New Folder.zip", "c:\test\", "*.*")oÝ÷ Økº{ºÙ趧+.8©¥çH¶¸vë"ÊdÚÛazƦzØbZ¦§±«¢+ÙIÕ¹]¥Ð¡ =5MAµÀìÅÕ½Ðì½èÀäÈíÁÕ¹é¥À¹áµµèÀäÈíÑÍÐÀäÈíÑÍйé¥ÀÅÕ½Ðì¤ Your test with 7ZIP and pkunzip is not the same! First you try to unzip the file "New Folder.zip" and then "test.zip". I guess there is no file "New Folder.zip". Check it first with FileExists(), then call _SevenZipExtract with the right parameters: ; Parameter(s): $sArchive - The Archive to use ; $sOutDir - Where to extract the files ; $sFilter - Files to extract from the Archive (e.g. *.exe) ; $sCMDLine - Optional Options ; $hWnd - The Window ; Requirement(s): None ; Return Value(s): On Success - Return 1 ; On Failure - Return 0; @Error = 1 ; Author(s): JAK-Software.org ; Note(s): Needs 7-zip32.dll in the path ; ;=============================================================================== Func _SevenZipExtract($sArchive, $sOutDir = ".", $sFilter = '*', $sCMDLine = '', $hWnd = 0) All paramaters, except the archive name, are optional. So your test would be: _SevenZipExtract("C:\temp\test.zip", "C:\test\new") EDIT: and you will need the 7ZIP Dll. But I think you knew that, right? Cheers Kurtd Edited August 8, 2006 by /dev/null __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Bert Posted August 8, 2006 Author Share Posted August 8, 2006 (edited) yep, I have it. Tested your code, and it didn't work. Did this: File to unzip is usr.zip. It needs to be unzipped with the folder structure intact. I put it inside a msgbox to debug. #include<sevenzip.au3> msgbox(0, "",_SevenZipExtract("C:\usr.zip", "C:\test")) As I said...hurting my brain on this one. I can make it work all day using a batch file, and for a dirty solution, I did that. It is messy however, so I rather get this working without the batch file. I get a 0 for a return, which tells me the 7zip failed edit: I needed to put the 7-zip32.dll in the same dir as the script, not just the include directory. I get a 1 for a return, but still nothing gets unzipped. Edited August 8, 2006 by vollyman The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
/dev/null Posted August 8, 2006 Share Posted August 8, 2006 yep, I have it. Tested your code, and it didn't work. Did this: works perfect here on my system! edit: I needed to put the 7-zip32.dll in the same dir as the script, not just the include directory. I get a 1 for a return, but still nothing gets unzipped. again: works perfectly on my system. #include "SevenZip.au3" $ret = _SevenZipExtract("c:\temp\7zip\test.zip") $ret = _SevenZipExtract("c:\temp\7zip\test.zip","C:\temp\7zip\k1") this creates either c:\temp\7zip\test or c:\temp\7zip\k1\test. Cheers Kurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Bert Posted August 9, 2006 Author Share Posted August 9, 2006 hmmm. thats odd. I will pull a system off the shelf and test tomorrow. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
mozart90 Posted August 9, 2006 Share Posted August 9, 2006 Hi, maybe you wanna have a look at my signature... Greetings mozart90 Easy Zip Compression using XP Link to comment Share on other sites More sharing options...
Bert Posted August 9, 2006 Author Share Posted August 9, 2006 Does it unzip? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
/dev/null Posted August 9, 2006 Share Posted August 9, 2006 Does it unzip?hm.. according to his post, YES._UnZip($sZip, $sDest)CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Bert Posted August 9, 2006 Author Share Posted August 9, 2006 been sick today... The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
MePHiTiC Posted January 4, 2007 Share Posted January 4, 2007 yep, I have it. Tested your code, and it didn't work. Did this: File to unzip is usr.zip. It needs to be unzipped with the folder structure intact. I put it inside a msgbox to debug. #include<sevenzip.au3> msgbox(0, "",_SevenZipExtract("C:\usr.zip", "C:\test")) As I said...hurting my brain on this one. I can make it work all day using a batch file, and for a dirty solution, I did that. It is messy however, so I rather get this working without the batch file. I get a 0 for a return, which tells me the 7zip failed edit: I needed to put the 7-zip32.dll in the same dir as the script, not just the include directory. I get a 1 for a return, but still nothing gets unzipped. I was messing around with this and downloaded the dll from the above link and inserted it into the same dir as my script. Everything was runnign fine except nothing was unzipping. After poking around I noticed the dll downloaded with an underscore rather then a dash in the file name. Fixed this and everything worked great. So check the filename of the dll you downloaded! Hope this helps, MePH 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