<< Click to Display Table of Contents >> Navigation: 3. Script Language > ZIP. - Handle Archives > ! Smart Package Robot 's ZIP-Commands |
Smart Package Robot 's ZIP Commands
Smart Package Robot can work with ZIP-Archives.
You can:
• extract Archives with Folders and files. (ZIP.)
• compress complete foiders into a single ZIP-File. (ZIP.)
• compress and uncompress Text-Data that is available in a variable. (ZIP.)
• Test if a specified filename or foldername exists inside an Archive or not. (IFZ.)
You can also apply these methods to groups of files, using FEF.
If you see this Logo, then you can use "Wildcards" in the Filesystem-Commands.
These are the well-known "*" and "?" - Wildcards.
Using Wildcards in the Pathname is not recommended, use them only in the Filename or extension.
Note that the first file or folder that fits to the wildcard is been taken.
Use Wildcards with extreme caution, as this may lead to unexpected results if there are multiple fitting files.
Here is a code Sample that will do a simple ZIP.- Operation.
'
'SPR Script-file: ZIP:-Sample
'Purpose:
'Author: Theo Gottwald
'
'===========================================================
'#EXE:?path\
'#SPI:ForceWrite
$$FIL=?path\readme.txt
CFF.$$FIL|$$TXT
FOR.§§LOP|0|10
ZIP.sdc|§§LOP
DBP.Compression is §§LOP
CFF.$$FIL|$$TXT
LEN.$$TXT|$$LEA
DBP.Original=$$LEA
$$TIA=#dtime#
ZIP.cv|$$TXT|$$TAR
$$TIB=#dsince#
CAL.$$TIT=$$TIB|r
LEN.$$TAR|$$LEB
DBP.Compressed=$$LEB / Time: $$TIT sec.
ZIP.uv|$$TAR
LEN.$$TAR|$$LEC
DBP.UnCompressed=$$LEC
NEX.
MBX.!
ENR.
'===========================================================