ExtractAll Method

Extracts all files from the compressed archive.


public void ExtractAll();
Public Sub ExtractAll()


ExtractAll extracts all files from the archive. The file(s) will be extracted to the directory specified by ExtractToPath, and given the names found in the archive or specified by the DecompressedName field of the file in the Files collection.

If Scan has not been invoked when ExtractAll is called, Scan will automatically be invoked, and the Files collection will be set to the values found in the archive. To manually set the decompressed filenames, Scan should be invoked before setting the DecompressedName field.

Invoking this method is equivalent to setting ExcludedFiles to the empty string, and then invoking Extract with "*" as the argument. Calling this method will cause the ExcludedFiles property to be ignored; to extract all files except those specified by ExcludedFiles, call the Extract method with the wildcard "*" as the method parameter instead of calling this method.

The BeginFile and EndFile events will be fired before and after each file is extracted, and the Progress event will be fired as the data is extracted. If WriteToProgressEvent is set to true, the decompressed data will be streamed out through the Progress event.

Example (Extracting from an Archive)

ZipControl.ArchiveFile = "c:\temp.zip"
ZipControl.ExtractToPath = "c:\extracted\"

.NET Standard Notes

To call this method in an asynchronous manner call ExtractAllAsync instead. When the method completes (or an error is encountered) the ExtractAllCompleted event will fire.

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks ZIP 2020 .NET Edition - Version 20.0 [Build 7720]