Solved

Create VB.Net applcation to unzip into a folder without using a tthird party DLL?

Posted on 2010-08-26
7
783 Views
Last Modified: 2012-05-10
Hi ALL!!!!


I am Selvam...

I have the doubt!

I used System.IO.Packaging & System.IO.Compression to make zip files...

Similarly Can we do Unzip with that above packages?

Without any third party DLL is it possible to create to unzip files into a folder which I specified?

0
Comment
Question by:Selvam_cse
  • 3
  • 3
7 Comments
 

Author Comment

by:Selvam_cse
ID: 33530421
Please give answer
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33530443
... there are no zip/unzip functions in vb.net ...

See also this thread: http://www.codeguru.com/forum/showthread.php?t=443029
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33530480
The .NET Framework includes GZipStream and related classes, but they only support compression, not the standard ZIP file structure. This article explains how you can handle correctly zipping and unzipping folders and files including using a zip password
http://eggheadcafe.com/tutorials/aspnet/9ce6c242-c14c-4969-9251-af95e4cf320f/zip--unzip-folders-and-f.aspx

0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:Selvam_cse
ID: 33530503
Hi,

So It is not possible to unzip without a third party DLL?
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 33530522
Like both links already explain: No.
0
 
LVL 27

Accepted Solution

by:
Ark earned 500 total points
ID: 33540176
Heh, impossible :)  It's a piece of cake!
Add reference to Microssoft Shell and Automation (COM)

    Private Sub Unzip(ByVal destFolder As String, ByVal srcZip As String)
        Dim oShell As New Shell32.Shell
        Dim oDestFolder As Shell32.Folder
        If Not System.IO.Directory.Exists(destFolder) Then
            System.IO.Directory.CreateDirectory(destFolder)
        End If
        oDestFolder = oShell.NameSpace(destFolder)
        oDestFolder.CopyHere(oShell.NameSpace(srcZip).Items)
        oDestFolder = Nothing
        oShell = Nothing
    End Sub
0
 

Author Closing Comment

by:Selvam_cse
ID: 33734375
Thanks Buddy
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question