home *** CD-ROM | disk | FTP | other *** search
/ High Voltage Shareware / high1.zip / high1 / DIR4 / ZDIFF14.ZIP / ZDIFF.DOC < prev    next >
Text File  |  1993-12-24  |  25KB  |  568 lines

  1.  
  2.  
  3.                                   ZDIFF v1.4
  4.                        The Archive/Directory comparison
  5.  
  6.                               Shareware program
  7.                       Copyright 1993, Christophe Dubourg
  8.                            Date : 24 December 1993
  9.  
  10.                                    ---*---
  11.  
  12.                               Table of contents
  13.  
  14.                       1 ........................Purpose
  15.                       2 ........................ Syntax
  16.                       3 ...................... Features
  17.                       4 .................. How it works
  18.                       5 .................. Requirements
  19.                       6 ........................ Limits
  20.                       7 ....................... Remarks
  21.                       8 .................... Disclaimer
  22.                       9 ............ Distribution files
  23.                      10 ............Registration/Author
  24.  
  25.                                    ---*---
  26.  
  27.  
  28.  
  29.  
  30. 1. Purpose :
  31. ------------
  32.  
  33.         ZDiff is a comparison utility program.
  34.  
  35.         You can compare a pair of archives, or a pair of directories, or
  36.         an archive and a directory. (that's the new of this !)
  37.         New in 1.4, you can also compare to a previously saved list.
  38.  
  39.         The result is a sorted list, showing the status of each file.
  40.  
  41.         ■ ZDIFF.EXE is the normal DOS version.
  42.         
  43.         ■ ZDIFFD.EXE is the DPMI hosted version.
  44.           It permits a larger amount of files to be treated (up to 16380)
  45.           and works with Windows or any other DPMI host.
  46.  
  47.  
  48. 2. Syntax :
  49. -----------
  50.  
  51.   ZDIFF <New Archive/Directory/List> <Old Archive/Directory/List>
  52.  
  53.         or
  54.  
  55.   ZDIFF <New Arc/Dir/List> <Old Arc/Dir/List> [options] [wildcards]
  56.  
  57.  
  58.         Note : To simplify the following, the archive or directory that
  59.         is compared to an other archive or directory will be called a
  60.         Set of files. There is a NEW set of files, and an OLD set of
  61.         files. (to determine the one that is Newer and the one that is
  62.         Older, for instance).
  63.  
  64.         The <New archive/directory> and <Old archive/directory>
  65.         parameters are needed (not optional).
  66.  
  67.         The order in which you specify the New/Old pair is important.
  68.         It will make the difference between a 'Deleted' file or
  69.         'Inserted' file, or a 'Newer' and 'Older', or 'Bigger' and
  70.         'Smaller'. (globally, it will determine the output result)
  71.  
  72.         To specify that a set of files is a LIST (not an archive or a
  73.         directory), just add an '@' in front of the LIST filename.
  74.         Like this : ZDIFF @MyList.LST MyNewDir /R
  75.         This way, I compare MYLIST.LST (which is a list), and MYNEWDIR
  76.         (which is a directory)
  77.  
  78.                 
  79.                 The NEW set of files must be specified first.
  80.                 ---------------------------------------------
  81.  
  82.         Then, you may specify wildcards if you need.
  83.  
  84.         a. Wildcards
  85.  
  86.         The wildcards may be used to restrict the files compared inside
  87.         the directory or archive. (for both the new and old sets,
  88.         because it would be unlogical to have two different wildcards).
  89.         The DOS standard wildcards are allowed. Note : wildcards are not
  90.         used in LISTs.
  91.  
  92.         b. Options
  93.  
  94.         The options may be specified anywhere on the command line, and
  95.         are not case sensitive. The options are :
  96.  
  97.           /b  :  Batch output.
  98.  
  99.         Only the file names are sent to standard output.
  100.         You may re-use the list as input with an other program.
  101.         (to update an archive with new files, or delete files that are
  102.         already in an archive or on a backup disk, for example)
  103.  
  104.           /c  :  Country flag override.
  105.  
  106.         If the dates in the ZIP files are not well recognized, you may
  107.         use this option to force the date format to use while reading
  108.         ZIP files :
  109.  
  110.             /C0 - USA date format.       (MM/DD/YY)
  111.             /C1 - EUROPEAN date format.  (DD/MM/YY)
  112.             /C2 - JAPANESE date format.  (YY/MM/DD)
  113.  
  114.           /d  :  Differences only.
  115.  
  116.         Once the two sets of files are compared, the output will only
  117.         show the files that are different between the 2 sets. (ANY
  118.         difference : date, size, crc, name...)
  119.         By default, all the files of the two sets are displayed.
  120.  
  121.           /h   :  Help !
  122.  
  123.         This display more help screens, and an information screen.
  124.  
  125.           /l   :  Generate a list.
  126.  
  127.         With this option turned on, you don't compare two sets of files,
  128.         you just generate a list from ONE set of files, that can later
  129.         be used to compare with... an other listing, or an other set of
  130.         files. This allows you to gain a lot of time if you want to
  131.         compare one set of files with several sets of files. (ZDiff,
  132.         when using a list, don't have to scan a disk for names, sizes,
  133.         dates, and CRC so it's incredibly FAST !)
  134.         When you generate a list, ZDiff try to obtain the maximum
  135.         informations from the source files.
  136.         If the source is a directory, both 16-bit and 32-bit CRC are
  137.         calculated and displayed in the output list. This allows you to
  138.         later either compare with a 16-bit CRC archiver output, or a
  139.         32-bit CRC one. If the source is an archive, only the CRC used
  140.         by the unarchiver output can be obtained and sent to the list
  141.         output. As usual, the display is sent to standard output, so to
  142.         save the list, just re-direct it, like this :
  143.  
  144.                         ZDIFF EXAMPLES /L >EXAMPLES.LST
  145.                     or  ZDIFF MYSAMPLES.ARJ /L >SAMPLSET.1
  146.                     or  ZDIFF /L DUMM.ZOO >DIR1.LST
  147.  
  148.         The first example outputs a list from the EXAMPLES directory,
  149.         calculating both 16 and 32-bit CRC, to EXAMPLES.LST.
  150.         The second example outputs a list of the files contained in
  151.         MYSAMPLES.ARJ - the CRC is 32-bit, since ARJ use 32-bit CRC.
  152.         The third example outputs a list from DUMM.ZOO, which use the
  153.         16-bit CRC.
  154.  
  155.           /m   :  Matching files only.
  156.           
  157.         The output will only show the files that are BOTH in the NEW and
  158.         the OLD set of files. Files that are only in the NEW set or only
  159.         in the OLD set (i.e., Deleted or Inserted files) will not be
  160.         shown. Useful if you want to compare a set which is only a
  161.         subset of the other.
  162.           
  163.           /n   :  No Path in names
  164.  
  165.         With this option, you can compare a full directory tree with a
  166.         single directory. Useful to compare a ZIP file that have a
  167.         directory tree stored inside of it, and a directory that
  168.         contains all the files without subdirectories.
  169.  
  170.         Example : to compare to directories, one containing the 'cut'
  171.         product, and one containing the 'development' version, like :
  172.  
  173.            New directory : BUILD\*.*
  174.  
  175.            Old directory : CUT\DISK1\*.*
  176.                            CUT\DISK2\*.*
  177.                            CUT\DISK3\*.*         etc...
  178.  
  179.         You can compare these 2 directories with the following command :
  180.  
  181.            ZDIFF /r /n BUILD CUT
  182.  
  183.           /p   :  Pause.
  184.  
  185.         With this option, ZDiff will prompt you before reading each set
  186.         of file. The purpose of this is essentially while using
  187.         floppies, or removeable media.
  188.         For example, if you need to compare two sets that are on two
  189.         different floppies that have the same format, you'll have to
  190.         insert one disk, read the files from it, and then the second
  191.         disk. Maybe, you could compare 2 removable hard disks, or a hard
  192.         disk and an archive, or whatever you want.
  193.         
  194.           /q   :  Quick scan.
  195.           
  196.         If a directory is involved in comparison, this permits to skip
  197.         the CRC calculation on each file of this directory, in order to
  198.         speed up the process. Of course, use this option with caution,
  199.         since the comparison is then only made with TimeStamp and Size !
  200.         (two files can have the same date and time of last modification,
  201.         the same size, and be binary different : using this option, they
  202.         will be marked as 'Same'). However, if the timestamp or size is
  203.         different, 'Differs' will be displayed.
  204.          
  205.           /r   :  Recurse directories.
  206.  
  207.         By default, the subdirectories are not searched, either in the
  208.         archive or the directory file structure. (to save time). This
  209.         switch allows the comparison of the full tree of directories.
  210.         Note : if you don't specify the -r option, the filenames that
  211.         contains a path in the archives are not treated at all. A
  212.         warning is displayed if a path is found in an archive, if you
  213.         have not used the -r option.
  214.  
  215.           /v    :  Verbose output.
  216.  
  217.         This option causes a status to be output at the end of comparison.
  218.         This status report shows the number of files that are :
  219.  
  220.                 - Identical
  221.                 - Different
  222.                 - Newer
  223.                 - Older
  224.                 - Bigger
  225.                 - Smaller
  226.                 - Inserted
  227.                 - Deleted
  228.  
  229.         It may give an idea of the amount of differences between the two
  230.         sets, without having to analyze the whole output.
  231.  
  232.           /z    :  Zpecial messages.
  233.            
  234.         Troubleshooting mode option - display more information while
  235.         running, like Country code detected, date used, Zip version...
  236.         It may help if something seems to go wrong (with date format
  237.         detection, for example). Please note that using the DPMI version
  238.         of ZDiff with the Borland RTM DPMI server, the Country Code
  239.         number MAY be inaccurate. However this doesn't affect the DATE
  240.         FORMAT detection. (See the /C option to override the Date format
  241.         detection)
  242.  
  243.  
  244. 3. Features :
  245. -------------
  246.         Since this is a comparison program, you will probably want to know
  247.         how it compares the two sets of files :
  248.  
  249.         The keys of comparison are :
  250.  
  251. Name :  If two names of the sets don't match, either one is new or one is
  252.         deleted, depending on the order you specified for the comparison.
  253.         if the -r option is specified, the full filename must match.
  254.  
  255.         Once two files are found in both the 2 sets, a more precise
  256.         comparison occurs. The keys for comparison between two files that
  257.         have the same name are :
  258.  
  259. CRC  :  The most accurate CRC method is used to know if files are absolutely
  260.         identical or not.
  261.         CRC is either taken from the archive, or calculated from the files
  262.         in the case of a directory. 32-bit CRC is the default.
  263.         Note : if one of the sets is an archive of type LZH, LHA, ARC or
  264.         ZOO, then a 16-bit calculation is done on files, to match the CRC
  265.         that these archives use.
  266.         -> If you compare one archive which use 16-bit CRC and an other
  267.         which use 32-bit CRC, then they can't match : the Quick mode is
  268.         then automatically set to ON. (CRC are not compared). In this
  269.         case, the only way to compare these archives with a CRC is to
  270.         extract one of them to a directory, and then compare this
  271.         directory to the unextracted archive.
  272.  
  273.         If the Quick option is set, and at least one of the 2 sets is a
  274.         directory, no CRC calculation occurs, and files are assumed binary
  275.         identical.
  276.  
  277. Date :  To know which one is the oldest file, or the newest.
  278.         (Time is used, too)
  279.  
  280. Size :  To know which one is the biggest file, or the smallest.
  281.  
  282.  
  283. 4. How it works
  284. ---------------
  285.         To compare two directories, or a directory and a saved list, or
  286.         two lists, you won't need nothing but ZDIFF.EXE.
  287.         But to compare two archives, or an archive and a directory,
  288.         you'll need the correct unarchiver in your PATH, to access the
  289.         archives you have specified.
  290.  
  291.         The program supports all the current archive formats that are
  292.         commonly used and that I am aware of :
  293.  
  294.                 ZIP, ARJ, LHA, LZH, PAK, ZOO, ARC.
  295.  
  296.         The needed unarchiver, for each extension is :
  297.  
  298.                 *.ZIP     PKUNZIP.EXE   (v1.10 or v2.04+)
  299.  
  300.                 *.ARJ     ARJ.EXE       (v2.30)
  301.  
  302.                 *.LHA \
  303.                 *.LZH  -  LHA.EXE       (v2.12)
  304.                 *.PAK /
  305.  
  306.                 *.ZOO     ZOO.EXE       (v2.1)
  307.  
  308.                 *.ARC     PKUNPAK.EXE   (v3.61)
  309.                 
  310.         (each of these can be easily found on many BBS or Compuserve)
  311.  
  312.         Now, here is how ZDiff works :
  313.         The program first checks if the archive or directory or list
  314.         that you specified exists. (to prevent an error after some
  315.         precious seconds of calculation). At this point, it decides if a
  316.         32-bit or 16-bit calculation will occur (or no crc, if Quick
  317.         mode is set). Then, it analyzes the NEW set, and then the OLD
  318.         set.
  319.  
  320.         Three choices, concerning each set of file :
  321.  
  322.         a. If it's an archive:
  323.  
  324.         The unarchiver is called, to obtain a list of each file in the
  325.         archive, along with the date, crc, size, and so on.
  326.         This list is saved in a temporary file.
  327.         (Using the TEMP environment variable if available)
  328.         Then, the temporary file is opened, and scanned for each file in
  329.         it. Since all the informations are already calculated by the
  330.         unarchiver, there's nothing to compute (the crc is already
  331.         there).
  332.         
  333.         Each file entry is then compared or stored to a list in memory.
  334.  
  335.         b. If it's a directory:
  336.  
  337.         The directory is scanned, and all the files are opened, to
  338.         obtain their date, time, size, and a CRC calculation occurs.
  339.         (except if the Quick mode is set). Each file entry is then
  340.         treated like archive files entries.
  341.  
  342.         c. If it's a list:
  343.  
  344.         The list is opened, and scanned like an archiver output. The
  345.         only difference is that since BOTH the 16 and 32 bits CRC can be
  346.         presents, the CRC choosen is the one that correspond the best to
  347.         the other set of file to compare to. (the most accurate is
  348.         always taken) Each file entry is then treated like archives file
  349.         entries.
  350.  
  351.  
  352.         After all the files have been read in memory (the NEW set and
  353.         the OLD set of files), the sorted list is sent to standard
  354.         output. Since you can redirect standard output, you could use
  355.         this facility to pipe the output to a finder program (FIND,
  356.         GREP), or a viewer program (VIEW, LIST), or any filter program
  357.         of your choice.
  358.  
  359.         
  360.         Here are some examples :
  361.  
  362.         1.  ZDIFF NEWARC.ZIP OLDARC.ARJ | more
  363.  
  364.             This outputs the result of the comparison via the DOS's
  365.             MORE filter command.
  366.             (if the archive contains sub-dirs, they are not included,
  367.             since no -r parameter is there - instead, you'll obtain a
  368.             warning while running ZDiff).
  369.  
  370.         2.  ZDIFF /r NEWARC.ZIP OLDDIR *.DOC | FIND "Newer" | LIST /s
  371.  
  372.             This displays, via the LIST full-screen viewer, all the NEW
  373.             files in NEWARC.ZIP, compared to the OLDDIR directory files.
  374.             Subdirectories are scanned, too. Only the .DOC files are
  375.             processed.
  376.  
  377.         3.  ZDIFF NEWZIP.ZIP . -r -q -c1
  378.         
  379.             This outputs on screen the differences between the archive
  380.             NEWZIP.ZIP and the current directory. The subdirectories are
  381.             scanned, too, (-r) both in the archive and the directory.
  382.             A Quick scan (-q) of directories files will be made (no
  383.             CRC), so the comparison will be based on date, time and size
  384.             only. The date format used by PKUNZIP on this machine (-c1)
  385.             is the EUROPEAN date format (DD/MM/YY).
  386.  
  387.         4.  ZDIFF -v . -r OLDARC.LHA /d /q -m
  388.         
  389.             This output on screen the differences between the current
  390.             directory and the archive OLDARC.LHA. Subdirs (-r) are
  391.             scanned also. A Verbose (-v) status is displayed at end of
  392.             comparison. Only the differences are shown (/d), and no CRC
  393.             is calculated (/q). Only the matching files (-m) of the two
  394.             sets are displayed.
  395.  
  396.         5.  ZDIFF -L \BIN >MASTER.LST
  397.  
  398.             This outputs in MASTER.LST the list of files in the \BIN
  399.             directory, along with their date, time, 16-bit and 32-bit
  400.             CRC, and size. For later comparison purpose.
  401.  
  402.         6.  ZDIFF LATEST.ZIP @MASTER.LST -d
  403.             This outputs the differences between the latest product zipped
  404.             in LATEST.ZIP, and the master list generated by the previous
  405.             example.
  406.  
  407.  
  408. 5. Requirements :
  409. ----------------
  410.       ZDiff is compiled for 80286 and above systems.
  411.  
  412.       DOS version : a minimum of 200kb is required.
  413.  
  414.       DPMI version : 2MB or more memory would be good.
  415.       You need a DPMI host, of course. (Windows, for instance).
  416.  
  417.  
  418. 6. Limits :
  419. -----------
  420.  
  421.       ■ ZDIFF.EXE :
  422.         All the files informations are stored in DOS memory. (no EMS) It
  423.         allows between about 5500 to 9900 files to be stored, depending
  424.         on the path lengths and your available system memory - this is
  425.         much enough for everyday use, I guess.
  426.  
  427.       ■ ZDIFFD.EXE :
  428.         All the files informations are stored in the GLOBAL memory.
  429.         (DPMI) So, you can virtually store as many files that you have
  430.         memory free, up to 16380 files at one time in memory.
  431.         You need Windows or any other DPMI server, like Borland's RTM.
  432.         Note : Borland DPMI server can be found on Compuserve : GO
  433.         BORFORUMS, then go to 'Borland Pascal forum'. Then, choose the
  434.         'From Borland' library section, and download the file called
  435.         NEWRTM.ZIP.
  436.  
  437.       ■ Note concerning the archives : if the -r option is not
  438.         specified, the files containing a path in their name are not
  439.         included in the comparison. Only the files in the main directory
  440.         of the archive are treated, and only the files in the specified
  441.         directory are treated also.
  442.         However, a warning is displayed if a directory path is found in
  443.         an archive, and if you haven't specified the -r option.
  444.  
  445.       ■ Note concerning the LISTS generated by ZDiff : you can't use
  446.         wildcards if a list is used in a comparison.
  447.         ->  But you can use wildcards to generate a list.
  448.  
  449.  
  450. 7. Remarks
  451. ----------
  452.         I made my possible to make this program free of bugs, but if
  453.         ever something is wrong with ZDIFF, tell me. I'll fix it ASAP.
  454.  
  455.         ZDiff is written in Pascal and Assembly, compiled using
  456.         Borland Pascal 7.01, (for DOS and DPMI targets).
  457.  
  458.         Please notice that ZDiff supports international information from
  459.         DOS, since PKUNZIP does. (it concerns the date format, used for
  460.         date comparison, that is different in US and in France, for
  461.         instance). The DOS Country information is read for this purpose.
  462.         The 3 date formats that exists are USA, European and Japanese.
  463.         If ever the comparison of dates seems to be wrong in ZDiff, you
  464.         can override (with the /C option) the automatic detection to set
  465.         a date format to use on your machine. See the 'Syntax' section.
  466.         
  467.         Note : if you use the /Z option to display technical
  468.         information, the country information reported by ZDIFFD.EXE (the
  469.         DPMI hosted version) may be inaccurate, if you use the Borland
  470.         DPMI RTM ; The date format, however, will be correctly detected
  471.         and used.
  472.         The correct country number will be correctly obtained, running
  473.         ZDiffD under Windows DPMI. Note : The country number is for
  474.         information only. Don't worry if it's wrong. Just check that the
  475.         date format displayed match your PKUNZIP outputs.
  476.  
  477.         Since ZDiff writes a few temporary data on your hard disk (in
  478.         your temp directory), you should not reboot while ZDiff is
  479.         running, as this could result in lost sectors. (CHKDSK /F would
  480.         corrects it anyway) Just use Ctrl-Break if you want to abort the
  481.         program.
  482.  
  483.  
  484. 8. Disclaimer
  485. -------------
  486.         Even if there is really no possibility for this program to
  487.         damage your data, here is the usual disclaimer message :
  488.  
  489.         As a shareware program, ZDIFF is distributed as-is.
  490.         The author disclaims all warranties, expressed or implied.
  491.         The author will assume no liability for damages either from the
  492.         direct use of this product or as a consequence of it's use.
  493.  
  494.         PKUNZIP, PKUNPAK, ZIP, ARJ, ZOO, PAK, LZH, LHARC, LHA are
  495.         copyrighted by their respective authors.
  496.         Borland Pascal is Copyright Borland International.
  497.  
  498.  
  499. 9. Distribution files
  500. ---------------------
  501.         Here is the file distribution list :
  502.  
  503.     Length     Date    Time    CRC-32   Name          Description
  504.     ------   --------  -----  --------  ------------  -------------------
  505.       3449   24-12-93  01:40  04f427ef  WHATSNEW.DOC  News in 1.4 version
  506.      58084   24-12-93  01:40  6e9abc7a  ZDIFF.EXE     The std DOS program
  507.      69080   24-12-93  01:40  74c281e0  ZDIFFD.EXE    The DPMI program
  508.      23688   24-12-93  01:40            ZDIFF.DOC     You read it!
  509.       1738   24-12-93  01:40  a5de6fa1  REGISTER.DOC  Registration form
  510.        348   24-12-93  01:40  db44371a  FILE_ID.DIZ   Short description
  511.     ------   --------  -----  --------  ------------  -------------------
  512.                
  513.  
  514. 10. Registration / author
  515. -------------------------
  516.         If you like this program, and plan to use it, you may try it
  517.         during a 21 days period, after what you should register.
  518.         I develop many tools for my own use, (this one helps me a lot!)
  519.         and it would be very pleasant to me, to know that these tools
  520.         are useful for someone else, too !
  521.         If you register, it will be a proof that my tools are useful :
  522.         in this case, I'll spend more time to update them, and adding
  523.         features - according to your requests or suggestions.
  524.  
  525.         The registration fee is $10 for a single user. For multi-user
  526.         registration, please look at the REGISTER.DOC form included in
  527.         the ZDiff package. I made this registration form for your
  528.         convenience ; you can print it, fill-in the blank fields, and
  529.         send it to me along with your check or bank note(s).
  530.  
  531.  
  532.                         **   Thanks in advance.   **
  533.  
  534.  
  535.               -------------------------------------------------
  536.               HERE IS MY ADDRESS         Christophe Dubourg
  537.               FOR (paper) MAIL,          23, rue Victor Hugo
  538.               CHECKS, or                 78370 PLAISIR
  539.               CASH :                     FRANCE
  540.               -------------------------------------------------
  541.  
  542.  
  543.   -->   Even if you don't send money, please feel free to send me your
  544.         remarks, suggestions, and specific problems encountered with
  545.         this program.
  546.  
  547.         It will be a pleasure to read your mail and to answer it !
  548.  
  549.         Don't hesitate to contact me, at the following addresses :
  550.         ---------------------------------------------------------------
  551.         Compuserve                :   73233,1412 (Christophe Dubourg)
  552.                                       or 73233,1412@compuserve.com
  553.                                       Forum : IBMSYS
  554.  
  555.         MCI Mail                  :   CDUBOURG  (453-6013)
  556.                                       or cdubourg@mcimail.com
  557.  
  558.         Internet                  :   cdubourg@borland.com
  559.  
  560.         At home (paper Mail)      :   Christophe Dubourg
  561.                                       23, rue Victor Hugo
  562.                                       78370 PLAISIR
  563.                                       FRANCE
  564.         ---------------------------------------------------------------
  565.  
  566.         Thanks for using ZDiff, I hope it helps.          //ChD
  567.  
  568.