Understand compressed files in VB.NET

Can someone help me solve the problem of how to decompress the zip file in VB.Net?

Use “Imports Shell32” for instant messaging

if you look Take a look at this CodeProject article, it should help you. If you encounter a specific problem, you need to put the code and problem description in your problem.

From the above article:

Sub UnZip()
Dim sc As New Shell32.Shell()
'Create directory in which you will unzip your files .
IO.Directory.CreateDirectory("D:\extractedFiles")
'Declare the folder where the files will be extracted
Dim output As Shell32.Folder = sc.NameSpace("D:\extractedFiles")< br />'Declare your input zip file as folder .
Dim input As Shell32.Folder = sc.NameSpace("d:\myzip.zip")
'Extract the files from the zip file using the CopyHere command .
output.CopyHere(input.Items, 4)

End Sub

Link Folder.CopyHere method

Or, if you are using .Net 4.5, you can use ZipFile Class

Link example:

Imports System.IO
Imports System.IO.Compression

Module Module1

Sub Main()< br /> Dim startPath As String = "c:\example\start"
Dim zipPath As String = "c:\example\result.zip"
Dim extractPath As String = "c:\example\ extract"

ZipFile.CreateFromDirectory(startPath, zipPath)

ZipFile.ExtractToDirectory(zipPath, extractPath)
End Sub

End Module

Can someone help me solve the problem of how to decompress the zip file in VB.Net?

Use “Imports Shell32” for instant messaging

If you look at this CodeProject article, it should be something for you Help. If you encounter a specific problem, you need to put the code and problem description in your problem.

From the article above:

< pre>Sub UnZip()
Dim sc As New Shell32.Shell()
‘Create directory in which you will unzip your files .
IO.Directory.CreateDirectory(“D:\extractedFiles” )
‘Declare the folder where the files will be extracted
Dim output As Shell32.Folder = sc.NameSpace(“D:\extractedFiles”)
‘Declare your input zip file as folder.
Dim input As Shell32.Folder = sc.NameSpace(“d:\myzip.zip”)
‘Extract the files from the zip file using the CopyHere command .
output.CopyHere(input .Items, 4)

End Sub

Link Folder.CopyHere method

Or, if you are using .Net 4.5, you can use ZipFile Class

Link example:

Imports System.IO
Imports System.IO.Compression
< br />Module Module1

Sub Main()
Dim startPath As String = "c:\example\start"
Dim zipPath As String = "c:\example\result.zip"
Dim extractPath As String = "c:\example\extract"

ZipFile.CreateFromDirectory(startPath, zipPath)

ZipFile.ExtractToDirectory(zipPath, extractPath)
End Sub

End Module

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 3440 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.