Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hi,
m unable to unzip a folder using ZIPPACKAGE of system.IO.packaging.
:(
d folder consists of files in different formats like XML,XLS,HTM etc.
all i hv is dat i get d folder(in zipped format)in one of my local drives frm a common shared location & i directly copy d zipped folder 2 my local drive frm dere.
the size of the folder is approx 30 MB (hope dere's no issue related to the size).
i came 2 knw abt system.IO.packaging by Googling...n implemented d code by making sm relevant changes.
need urgent help.
Thnx in advance
Posted
Updated 20-Sep-12 23:05pm
v2
Comments
Richard MacCutchan 21-Sep-12 3:28am    
You will need to provide a lot more information than this if you expect any useful suggestions.
aryan_85 21-Sep-12 5:06am    
do i need 2 paste d code?
aryan_85 21-Sep-12 7:13am    
well...richard..u were quick enough to jst pass by leisurly & post d above comment...but not quick enough 2 post a solution..
:(
saddening..
:(
Richard MacCutchan 21-Sep-12 8:56am    
Strangely enough some of us here have other things to do with our time than worry about your problems. We answer questions in our own time with absolutely no cost to you. If you find that below the standard that you expect, then you are totally free to go elsewhere and pay for a proper service contract.

1 solution

I don't know about the ZIPPACKAGE. I'm using DotNetZip Library from CodePlex[^]. It is easy to use in C# or VB.NET and the examples are good.

For instance the follow code would unzip all files in a WinZip file (using the DotNetZip code)
VB
Imports Ionic.Zip

Private Sub UnzipFile(filename As String, targetFolder As String, password As String)
    Using zip As ZipFile = ZipFile.Read(filename)
        If String.IsNullOrEmpty(password) Then
            zip.Password = password
        End If

        zip.ExtractAll(targetFolder)
    End Using
End Sub 
 
Share this answer
 
v2
Comments
aryan_85 21-Sep-12 8:53am    
thnx a lot martijn 4 d prompt help..
:)
but i can't use a third party tool or library..
:(
poor me..
jst 4 info purpose- came 2 knw dat ZIPPACKAGE works efficiently on only those files/ folders dat r zipped/compressed using ZIPPACKAGE itself..
:\
anyways..thnx again..
:)
Martijn Kok 21-Sep-12 8:56am    
Good you discovered why ZIPPACKAGE wasn't working. I hope you find a good solution to work with zippackage.
aryan_85 25-Sep-12 2:58am    
http://www.codeproject.com/Articles/209731/Csharp-use-Zip-archives-without-external-libraries
Martijn Kok 25-Sep-12 3:08am    
Thanks :)

I have read it partally and it looks very promissing. I'm definitely going to test the demo code. Using Visual Studio components do have my preference over third party components.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900