home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / proglc / dxarc3.lzh / DXARC.DOC < prev    next >
Encoding:
Text File  |  1987-03-15  |  9.1 KB  |  261 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.         
  9.                         DXARC:  Delete Extracted .ARC Files
  10.         
  11.                      A Public Domain Utility by Rowland Archer
  12.         
  13.                            Version 1.0 -- March 12, 1987
  14.         
  15.         
  16.         What it Does
  17.         ------------
  18.         
  19.         DXARC is used to clean up a directory by deleting the files that
  20.         came out of archive (.ARC) files.  An .ARC file is a single MS-DOS
  21.         file that contains one or more files in a compressed format.  The
  22.         .ARC format is used on many computer bulletin board systems to
  23.         store several related files together for transfer between
  24.         computers over the phone lines.
  25.         
  26.         To use DXARC, you give it the name of a .ARC file (or a filename
  27.         template containing wildcards) and it will:
  28.         
  29.         a.  Look for that .ARC file, adding the .ARC extension if
  30.             you don't provide an extension.  If you give a template with
  31.             wildcards, the following steps are performed for each file
  32.             matching the template.
  33.         b.  Open the .ARC file and read through it
  34.         c.  For each file contained in the .ARC file:
  35.             1.  Look in the current directory OR the directory you
  36.                 specify as the second pathname argument on the command
  37.                 line
  38.             2.  If a file of the same name is found in the directory,
  39.                 compare its size, and time and date of creation to the
  40.                 file in the archive; if they match, DELETE THE FILE in
  41.                 the directory.  
  42.         
  43.         THE ARCHIVE FILE IS NEVER MODIFIED, so you can't unintentionally
  44.         delete a file that you don't have a copy of in the archive. 
  45.         
  46.         **NOTE**:  early archive formats didn't store the real file size
  47.         inside the archive, so that test is skipped for such archives. 
  48.         The date and time of creation are checked, however.
  49.         
  50.         The next section details the command line used to invoke DXARC.
  51.         
  52.         
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. DXARC Utility                                                            Page 2.
  69.  
  70.  
  71.  
  72.         
  73.         Using DXARC
  74.         -----------
  75.         
  76.         The complete DXARC command line syntax:
  77.         
  78.         DXARC <arc_file_template>[.ARC] [<cleanup_directory>] [options]
  79.         
  80.         ---------------------------------------------------------------
  81.         Notational conventions:
  82.         
  83.         [    ]:     Square brackets surround an optional argument
  84.         <abcd>:     Angle brackets denote an object described in detail
  85.                     later.  E.g., <filename> means an MS-DOS file name,
  86.                     such as MANYFILE.ARC.  You don't type the <>'s when
  87.                     you use DXARC.
  88.         ---------------------------------------------------------------
  89.         
  90.         <arc_file_template>    Archive file name, may be simple filename,
  91.                                full pathname, or template with wildcards. 
  92.         
  93.                                This argument is required.  If it is not
  94.                                supplied, DXARC types out a help screen
  95.                                and quits.
  96.         
  97.                                Default extension .ARC is supplied if no
  98.                                extension is given.
  99.         
  100.                                Full pathname may include drive specifier
  101.                                such as "A:".
  102.         
  103.         <cleanup_directory>    Optional directory searched for files to  
  104.                                delete.  May include drive specifier.
  105.         
  106.                                Default is current working drive and
  107.                                directory, assumed if no <cleanup_
  108.                                directory> is given.
  109.         
  110.         [options]              Options (also known as "switches") must be
  111.                                listed singly and each one prefixed by the
  112.                                slash ("/") character.
  113.         
  114.                                In other words, /C/F is ok, /CF is not.
  115.         
  116.                                DXARC is liberal about placement of options
  117.                                on the command line; they may appear
  118.                                affixed to the command, either pathname
  119.                                argument, or by themselves.
  120.         
  121.                     /C         Confirm by asking (yes/no) before deleting
  122.                                each file.  You must type 'Y' to delete the
  123.                                file or 'N' to not delete it.
  124.         
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133. DXARC Utility                                                            Page 3.
  134.  
  135.  
  136.  
  137.                     /F         Force delete on matching filename even if
  138.                                there is a mismatch in creation date, time
  139.                                or file size. 
  140.         
  141.                                This may be useful for some past revisions
  142.                                of the various un-ARCHIVER utilities that
  143.                                didn't preserve the time and date when they
  144.                                extracted files, but gave them the time and
  145.                                date of the time of extraction instead.
  146.         
  147.                     /N         No deletions at all, just report what would
  148.                                be deleted.
  149.         
  150.                                This can be used if you want to experiment
  151.                                without actually deleting any files.  It
  152.                                lets you see what will happen when you run
  153.                                DXARC without the /N switch.
  154.         
  155.         -----------------------------------------------------------------
  156.         
  157.         Examples:
  158.         
  159.         a. DXARC DXARC.ARC     Deletes any files in the current directory
  160.                                whose names, date and time stamps, and
  161.                                extracted file size match the files of
  162.                                DXARC.ARC.
  163.         
  164.         b. DXARC *.ARC         Deletes any files in the current directory
  165.                                whose name, date and time stamp, and
  166.                                extracted file size match the files of each
  167.                                archive file (all files matching the
  168.                                template *.ARC) in the current directory.
  169.         
  170.         c. DXARC *.ARC A:\DIR  Like (b) but searches for files to delete
  171.                                in A:\dir instead of using the current
  172.                                directory.
  173.          
  174.         c. DXARC *.ARC/F       Like (b) but ignores the timestamp and size
  175.                                and deletes files with matching names.
  176.         
  177.         d. DXARC *.ARC/C       Like (b) but asks before deleting each
  178.                                file.  You must answer 'Y' to delete or 'N'
  179.                                to skip deleting the file.
  180.         
  181.         e. DXARC *.ARC/N       Like (b) but doesn't delete any files; just
  182.                                reports what it finds. 
  183.         
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198. DXARC Utility                                                            Page 4.
  199.  
  200.  
  201.  
  202.         
  203.         Sources Included
  204.         ----------------
  205.         
  206.         The sources for DXARC are included so you can modify the program
  207.         for your own use.  Please don't modify and re-distribute under my
  208.         name since I can't keep track of changes.  Other than this you can
  209.         use the code as you see fit.
  210.         
  211.         DXARC is written in Microsoft C 4.0 and requires a number of
  212.         runtime libraries from that system.  It also uses several
  213.         libraries from Jack A. Zucker's excellent JAZLIB, available on
  214.         many BBS systems.  
  215.         
  216.         The files contained in DXARC.ARC:
  217.         
  218.         DXARC.EXE             Executable program file
  219.         DXARC.DOC             This documentation file
  220.         DXARC.C               Source code in Microsoft C 4.0
  221.         DXARC                 "Make file;" instructions to compile and
  222.                               link under Microsoft C 4.0 with Codeview,
  223.                               using the MAKE utility that comes with MSC 
  224.                               4.0.
  225.         FINAL                 "Make file" used to produce final DXARC.EXE,
  226.                               no Codeview support included at that point.
  227.         
  228.         
  229.         Support
  230.         -------
  231.         
  232.         Although I have no interest (financial or otherwise!) in making a
  233.         career out of modifying DXARC, like most programmers I'll be glad
  234.         to hear praise or problems.  I can't guarantee I'll be able to fix
  235.         anything but....  You can probably reach me via one of the
  236.         following bulletin boards or commercial services:
  237.         
  238.         a.  Compuserve ID 70075,117
  239.         b.  Gene Plantz IBBS in Chicago: (312) 885-9557
  240.         c.  Bob Mahoney's Exec-PC in Milwaukee: (414) 964-5160
  241.         d.  Bob Blacher's Computer Connection in DC:  (202) 547-2008
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.