ZIP-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > ZIP. - Handle Archives >

ZIP-Commands

ZIP.unzip file/folder

Previous Top Next


MiniRobotLanguage (MRL)

 

ZIP.unzip file/folder

UnZip the content of a file or a complete Archive with Folders

 

 

Intention

 

The ZIP.uf - Command can be used to unZip (unpack) the content of a Standard ZIP-file, that is compatible with the ZIP-Format.

These Archives can be created with the ZIP.-Command "zf" or "cf" or with any available other Standard ZIP-Compression Utility.

 

It can be used in two ways:

 

' This will extract the content of the Archive

' into ?path.

§§FID=?path\Test\Document.zip

ZIP.uf|§§FID

 

or

 

' Give Source-Filename and Target Folder

§§FID=?path\Test\Document.zip

§§FIP=?path\Test\Sub

ZIP.uf|§§FID|§§FIP

 

This is the result. Note that the Target Folder is been created if it does not exist.

 

graphic

Inside the "Sub" Folder we find the files, that have been unpacked from the Archive "Document.zip".

 

graphic

 

Important:

If the Target-File does exist, the ZIP.-command will try to delete any existing Target file.

If this fails, the Target file will not be overwritten.

In case of such errors, the operation will continue without Error-Message.

Therefore its up to you to make sure that no (locked) target files exist before using the ZIP.-Command.

 

The "cf","zf" and the "uv" command are compatible with standard ZIP-Format.

 

 

 

Syntax

 

ZIP.uf|P2[|P3]

 

The "cf" and the "uf" command are compatible with standard ZIP-Format.

 

Parameter Explanation

 

P1 -  "uf" or "unzip file"

 

P2 - Variable with the filename of the Source (Zip-)file that is to be unpacked.

       If P3 is missing, the Files will be extracted in the same path where P2 is.:

 

P3 - (optional) Variable with the target file-path where the files from inside the Archive P1,

     will be extracted. .

 

 

 

 

Example

 

'***********************************************

' Sample 1: ZIP.

'***********************************************

§§FIP=?path\Test\Sub

§§FID=?path\Test\Document.zip

 

' Unpack to ?path\

ZIP.uf|§§FID

 

' Unpack to §§FIP

ZIP.uf|§§FID|§§FIP

 

ENR.

 

 

 

Remarks

 

The "cf","zf" and the "uf" command are compatible with standard ZIP-Format.

 

 

 

 

Limitations:

 

There is a size limitation that depends on the available 32-bit Memory in the WOW64.

Its somewhere between 1 GB and 2 GB.

 

 

 

See also:

 

  ZIP. - Handle Archives

  IFZ. / NFZ. - If File in ZIP

  cf - compress file

  uf - unzip file/folder

  uv - uncompress var

  cv - compress var

  sdk - set default compression