<< Click to Display Table of Contents >> Navigation: 3. Script Language > ZIP. - Handle Archives > ZIP-Commands |
MiniRobotLanguage (MRL)
ZIP.Zip Folder
Compress the entire content of a folder
Intention
The ZIP.zf - Command can be used to used to compress the entire content of a folder and all Subfolders. Currently empty Folders and Subfolders are Ignored.
This command will create a Standard ZIP-File that is compatible with the ZIP-Format.
There are generally two ways of usage.
' Only give the Path of the folder to ZIP.
§§FIF=?path\Data\
ZIP.zf|§§FIF
In this case the Folder-Name will be taken to construct the Name of the ZIP-Archive.
Also the Path of the Folder will the path where the Archive is been created. If the Archive does exist, files are added to the Archive. If the File is not a valid ZIP-File it will be deleted..
You can specify the name and path of the ZIP-Archive that is to be created.
§§FIF=?path\Data\
§§FIP=?path\Test\Sub\Hempel.zip
ZIP.zf|§§FIF|§§FIP
Or you can just specify the path where the ZIP-File is been created.
§§FIF=?path\MyData\
§§FIP=?path\
ZIP.zf|§§FIF|§§FIP
In this case the name of the Archive is been constructed from the name of the Source-Folder.
In case the Target Folder of the Archive that is to be created, does not exist, it will automatically be created.
If the Target-Zip File already exists, the Files are added to the existing ZIP-File.
The "cf","zf" and the "uv" command are compatible with standard ZIP-Format.
Syntax
ZIP.zf|P2[|P3][|P4][|P5]
The "zf" and the "uf" command are compatible with standard ZIP-Format.
Parameter Explanation
P1 - "zf" or "Zip Folder"
P2 - Variable with the path of the folder that is to be compressed.
P3 - (optional) Variable with the target file-name and path.
If omitted the Target Zip-Name is constructed from the Source-Folder name,
P4 - (optional) Variable with a File-Pattern using Wildcards.
If omitted, "*.*" is used.
P5 - (optional) Flags, can be any of these:
s - also collect System-Files
z - do NOT recurse Subfolders
o - Sort Files Downwards
h - also collect hidden files
If omitted, Subfolders are recursed and collected. But none of the other options.
Example
'***********************************************
' Sample 1: ZIP.
'***********************************************
§§FIF=?path\MyData\
§§FIP=?path\
' Compress the MyData-Folder
' to a Zip-File "MyData.zip" in ?path\
ZIP.zf|§§FIF|§§FIP
§§FIF=?path\MyData\
§§FIP=?path\Test\MyZipData.zip
ZIP.zf|§§FIF|§§FIP
ENR.
Remarks
The "cf","zf" and the "uf" command are compatible with standard ZIP-Format.
If the Target-Zip File already exists, the Files are added to the existing ZIP-File.
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:
• IFZ. / NFZ. - If File in ZIP
• sdk - set default compression