Please enable JavaScript to view this site.

Codolex

Navigation: Activities > Zipping

Extract zipfile

Scroll Prev Top Next More

Extract zipfile can be used to extract files from a zip, and place it at a destination

Uses System.Zip.TZipFile.Extract

 

ExtractZipFile

Activity properties

 

begin

var CurrentZip := ZipFile;

 CurrentZip.Extract('ZippedFile', Destination, False);

end;

Resulting Code

 

The provided zipfile can be a string with the path, or a variable of the TZipFile type.

If a existing TZipFile variable is provided, the File must be Opened before extracting.

 

The destination must be an existing path to a folder.

 

If a file (string) or index (Integer) is provided, only the file with the name or location will be extracted.

 

When 'Create sub folder' is selected, the path must be included in the Destination variable.

 

To prevent errors in the zip file, always Close the zipfile after extracting from the zip.

© by GDK Software