; *****************************************************
; Example72.ftp
; =============
; This example shows advanced "ZIPfile" support features
; -----------------------------------------------------
; These variables AND commands are supported by the
; Performer's ZIP facilities:
;
; Variables:
; ZIPPASSWORD
; ZIPROOTDIR
; ZIPSUBDIRS
;
; Commands:
; PREPAREZIP
; ADDTOZIP
; ZIP
; UNZIP
;
; -----------------------------------------------------
; NOTE: This example should work on all PCs!
; *****************************************************
if NOT Local-DirExists( "C:\Tests" ) Then
Local-MD "C:\Tests"
endif
; Set the Zip filename:
PrepareZip "C:\Tests\AZipTest.ZIP"
; Set the initial root directory:
Let ZipRootDir="C:\"
; Tell the Zipper to zip also the files contained in the subdirectories
Let ZipSubDirs="True"
; Zip all .CSV files
AddToZip "*.com"
; Now we will zip the files added by "AddZip" above
; Because we have told the Script that the root directory
; is "C:\" and to include Sub-Directories, the script will
; scan the entire hard-disk "C:" for ".COM" files and add
; them to the ZIP file.
Zip
; Just as a showcase, we will add two more files to the ZIP
; to demonstrate how to add to an already existing ZIP file.
PrepareZip "C:\Tests\AZipTest.ZIP"
Let ZipRootDir=""
Let ZipSubDirs="False"
AddToZip "C:\*.bat"
AddToZip "C:\*.sys"
Zip
Message "Files have been zipped!"