1
Vote

Can't delete split zipfiles after extraction

description

After unzipping a splitted zipfile, I can delete .z01, .z02, *.z03 etc.
When I try to delete the *.zip, it doesn't work, because the file is still in use by the application.

--- Code ----
     Using oZip As ZipFile = ZipFile.Read(f)
                          Dim a As New ZipEntry

                          For Each a In oZip
                              sOriginalName = a.FileName
                                a.Extract(sDestinationPath, ExtractExistingFileAction.OverwriteSilently)
                          Next
      End Using
...
For Each s In lstToDelete
      If s.Contains(sFilename.Substring(0, sFilename.Length - 3)) Then
                     File.Delete(s)
      End If
Next

comments