Extract Zip File Action ⇐  ⇑  ⇒

This action allows you to extract files from a zip archive file. You can choose which files to extract using file masks or just extract all files.

Zip File - the location of the zip file to extract

Output Directory - the directory where the extracted files will be copied to

Relative Root Dir - this allows you to extract files from an archive that was not created using the relative paths option and still treat it as though it was.  In this case you should set Relative Root Dir to the value that you want stripped from the internal path information for each file that is unzipped.  For instance, if you had an archive containing the following information:

Filename        Path Info

file1.txt        backups\subdir1\

file2.txt        backups\subdir1\subdir2\

file3.txt        backups\subdir1\subdir3\

and you wished to extract these files to an Output Directory of c:\restore\backups and retain the directory structure, normally you would end up with something like the following being extracted:

c:\restore\backups\backups\subdir1\file1.txt

c:\restore\backups\backups\subdir1\subdir2\file2.txt

c:\restore\backups\backups\subdir1\subdir3\file3.txt

when what you really wanted was:

c:\restore\backups\subdir1\file1.txt

c:\restore\backups\subdir1\subdir2\file2.txt

c:\restore\backups\subdir1\subdir3\file3.txt

You can produce the desired results simply by setting Relative Root Dir to "backups\subdir1\".

Overwrite Mode - Set this property to determine what should be done if a file is about to be extracted and a file of the same name already exists in the destination directory.  The possible modes are: Always, Never, If Newer, If Older.

Always        The file will be overwritten.

Never        The file will not be extracted if it would overwrite a file.

ifNewer        The file will only overwrite the existing one if the archived file is newer than the existing one.

ifOlder        The file will only overwrite the existing one if the archived file is older than the existing one.

Recreate Directories - Set this property to True if you want to use directory information in the zipfile when extracting files.  The directories will be created relative to the Destination Directory.  If this property is False, all files will be extracted to the Destination Directory, which could possibly result in files of the same name overwriting each other if the Overwrite Mode property is set to Always.

Retain Attributes - This property should be set to true if you wish unzipped files to retain the attributes that they had when they were originally zipped.

Extract Files - Choose whether to extract all files or only files that match a file mask.