This topic demonstrates how to remove file(s) from within a zip file using the static Remove method of the QuickZip class.
The Remove method can be used to remove one or more files and folders from within a zip file either recursively or not.
The following example demonstrates how to remove all files that begin with "xceed" from a zip file that contains various files.
VB.NET | Copy Code |
---|---|
|
C# | Copy Code |
---|---|
|
Note that the filesToRemove parameter of the Remove method cannot be null otherwise an ArgumentNullException exception will be thrown.
The main questions you should ask yourself when removing files from a zip file are:
Do you want to do more complex zip file operations? Use the other classes defined within the Xceed.Zip namespace.