ZIP Append file(s) to a zip archive |
Top Previous Next |
This script command appends files to an existing zip archive or, if the /create option is specified, it creates a new zip file. Robo-FTP is compatible with the 64-bit zip algorithm so it can create zip archives with a theoretical limit of 18 million terrabytes.
Upon completion of the command, the %zipcount internal script variable contains the total number of files zipped by this command.
Consider the following example in which a single file is zipped into a new archive. The resulting archive file is named zipfile.zip and is located in Robo-FTP’s working folder.
ZIP "zipfile" "mydata.xml" /create
The following example adds another file to the same archive.
ZIP "zipfile" "mydata2.xml"
The example below adds all the .xml files in Robo-FTP’s working folder to an existing password protected archive.
ZIP "zipfile" "*.xml" /pw=mysecret
The example below adds all the .xml files in Robo-FTP’s working folder and in any subfolders to an existing archive. Relative path names of any files found in subfolders are saved in the archive.
ZIP "zipfile" "*.xml" /subdirs
The example below stores (but does not compress) all the files in Robo-FTP’s working folder and in any subfolders in a new archive. Relative path names of any files found in subfolders are saved in the archive.
ZIP "c:\temp\archive.zip" "*" /subdirs /compress=none /create
Caution With the ZIP command the [target] zip is specified before the [source] file to be archived. This is reversed from many of the other Robo-FTP script commands like UNZIP, PGPENCRYPT and PGPDECRYPT.
Related Command(s): UNZIP, WORKINGDIR See Also: Data Compression
|