Solved

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

Posted on 2010-08-26
7
772 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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now