Imports System.IO.Compression

Public Class CreateZipFileExtractFile

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim Zippath As String = "c:\m\one.zip"
Dim extractpath As String = "c:\m\test"
ZipFile.ExtractToDirectory(Zippath, extractpath)
End Sub
End Class

I have this piece of code to extract files from a zip file to a location and its being implemented in my autoupdater, it works fine though but I have a an error when a file already exit in the extract location, so How can I make it replace files if they already exist? Btw this short code is not even mine but I´ll had this functionality to my software. I saw some questions regarding extracting zip files but not replacing files.Sorry if this is a repeated question. Ty for anyhelp and sorry my bad english.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.