ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Dialogs.FileOperation.TJamFileOperation.Unzip

Extracts files from a ZIP file to an existing directory.

Syntax
Pascal
class procedure Unzip(const pZipFile: IItemIdList; const pFolder: IItemIdList; pOptions: TOperationOptions = soDefault); overload; static;
Parameters 
Description 
const pZipFile: IItemIdList 
The existing ZIP file.  
const pFolder: IItemIdList 
The folder where the files should be extracted.  
pOptions: TOperationOptions = soDefault 
Optional: The options to use.  
Exceptions 
Description 
if pZipFile or pFolder are invalid or if any COM exception occured.  

The following example shows how to unzip the contents of a ZIP file:

  var
    ZipFile, Folder: IItemIdList;
  begin
    ZipFile := TJamItemIdList.Create('C:Zipfile.zip');
    Folder := TJamItemIdList.Create('C:UsersPublic');
    TJamFileOperation.Unzip(ZipFile, Folder);
  end;