BNAMEb zip - package and compress (archive) files BSYNOPSISb B*zipb [-# -D -q -r -X] [-i@includefile] [-t date] [-p path] [zipfile] [inpath] [-quit quitcmd] BDESCRIPTIONb zip is a compression and file packaging utility for Unix, VMS, MSDOS, OS/2, CP/M, Windows NT, Minix, Atari, Macintosh, Amiga, Acorn RISC OS and Acorn BBC. A companion program (unzip), unpacks zip archives. The zip and unzip(1) programs can work with archives produced by PKZIP and Archive(1), and PKZIP, PKUNZIP and Archive can work with archives produced by zip. zip version 1.20 is compatible with PKZIP 2.04 and Archive 2.16. Note that PKUNZIP 1.10 cannot extract files produced by PKZIP 2.04 or zip. You must use PKUNZIP 2.04g (or later versions) to extract them. The program is useful for packaging a set of files for distribution; for archiving files; and for saving disk space by temporarily compressing unused files or directories. This describes the current BBC version of zip which currently does not compress files, just archives them. BARGUMENTSb outfile path of the zipfile to create. The zipfile will be typed to Archive (&DDC). inpath Path to include. If inpath is a directory, then all files within that directory will be included. If inpath is a file, just that single file will be included. If inpath contains wildcards then it will use only the first matching object. BOPTIONSb Options supplied to the BBC version of zip must currently each be specified singlely. This is different to other platforms where multiple options can be run together. -? Display the zip command line syntax. -D Do not create entries in the zip archive for directories. Directory entries are created by default so that their attributes can be saved in the zip archive. -i@filename Include the files listed in the file specified by filename. If no filename is given, the filenames are read from the input stream. -p path Prepends the specified path onto the stored filename in the archive. This allows the entries within an archive to appear to be within the specified directory. For example: *zip outfile infile -p DirName will store infile in the archive, where it will be called DirName.infile. -q Quiet mode. All output messages are disabled. -quit quitcmd Command to execute on termination. This allows zip to be called and then continue to a specified program. If quitcmd starts with a '*' it is called as a *command, otherwise it is CHAINed. -r Travel the directory structure recursively, for example: *zip outfile indir -r In this case, all the files and directories in indir are saved in a zip archive named outfile. -t date Only include files that were modified on the specified date or later. The date is specified as dd/mm/yyyy. -X Include extra file information - main account, auxillary account, cration date and time. This will include all the metadata associated with object stored on SJ MDFS fileservers and in filing systems such as HADFS, as well as the information stored by default, the load and execution addresses, the file attributes and the last modification time and date -# Specify the compression type used, where -0 is no compression (store all files) and -8 is deflate. BBCZip will compress files if used on RISC OS with SparkFS running. Otherwise, any -# option is ignored and BBCZip stores files. BEXAMPLESb The simplest example: *zip stuff things creates the archive stuff and puts all the files in the directory things in it. This will not include any subdirectories from the directory. To do this, the command: *zip stuff -r things creates the archive stuff, containing all the files and directories in directory things. The use of the -p option allows the entries within the archive to be named as being in a specified directory. For example: *zip BBCZip/zip BBCZip -r -p Software.Archivers.BBCZip will archive the entries within the directory BBCZip and within the archive the entries will appear to be within a directory named Software.Archivers.BBCZip. Using this small parts of a directory tree can be archived without the whole directory tree having to be archived. The -i@ option allows a list of files in a textfile to be archived. For example: *zip Update/zip :Docs.$ -i@uplist will create the archive Update/zip containing only those files in directory :Docs.$ that are listed in the text file uplist. This option is useful when creating an update archive based on a comparison with another archive. The lines in the include file must be terminated with s. Note that there is no space between the '-i@' option and the filename. Using the -X option will include all the extra file information that systems such as the SJ MDFS fileserver have. Using: *zip backup1 :SYSTEM.$ -r -X -p :SYSTEM.$ will create an archive of everything on the disk SYSTEM including all the additional file information, and including the name of the source directory in the archive entry names. This archive can be unzipped to completely restore all the files on disk SYSTEM along with all the associated file information using: *unzip backup1 -X Note that to do this the appropriate user previledges will be required. The -t option gives the ability to make incremental zip archives, zipping up only files that have been modified after a certain date. As an example, extending the previous example to: *zip backup1 :SYSTEM.$ -r -X -t 01/12/1999 -p :SYSTEM.$ would zip up only those files that were last modified on 1st December 1999 or later. Note that you shouldn't try to create the zipfile within the directory structure that you specify to include in the zipfile otherwise zip will attempt to include the zipfile within itself. For example: *zip stuff @ will create the zipfile stuff within the current directory, and try to include within it all the files within the current directory, including the zipfile. BNOTESb zip 1.xx currently does not compress files, just stores. If running in an environment where SparkFS is available, then compression is available by calling *ZipCompress. zip attempts to find additional file info by using OsFile &FD, NetFS_Op 3,0, NetFS_Op 18,64 and NetFS_Op 18,65. Need to do: Read info with OsFile &FD Implement /xtn extension expansion, eg /z -> /zip, etc. Store 'P' bit from MDFS Is DefAccess info readable from MDFS? Debugging options of -CRCFast [0|1] and -nozipdir included. BSEE ALSOb Archive(1), UnZip(1), UnZip(9), Zip(1), Zip(5), Zip(9), ZipCat(1), ZipDiff(1), ZipEx(1), ZipInfo(1).