BNAMEb zipdiff - compare zip archive against file system BSYNOPSISb B*zipdiffb [-r] [-t date] [zipfile] [inpath] [listfile] [[-d] delfile] [-random] [-quit quitcmd] needs options for: prefix to add to delfile, so it can be executed, eg "*Delete %s R~C~V" BDESCRIPTIONb zipdiff compares the contents of a zip archive with the specified file system. It outputs a list of entries that need to be added and a list of entries that need removing from the archive to make the archive match the filesystem. By default zipdiff assumes that the archive is strictly ordered to speed up searching. The program is useful for creating incremental backups by comparing to an external archive, particularly when comparing to a zip manifest (an archive that contains file information only, and no file data). BARGUMENTSb zipfile path of the zipfile to compare to. inpath Path to directory to scan to compare with the zip archive. If inpath contains wildcards then it will use only the first matching object. listfile Output text file of entries missing from the zip archive, suitable for passng to zip with zip -i@filename delfile Output text file of entries in the zip archive that need to be removed. ----8<---- 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. -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. -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. -v Verbose mode or print diagnostic version info. BEXAMPLESb The simplest example: *zipdiff thisdir/zip thisdir addfile ##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), ZipEx(1), ZipInfo(1).