home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / zip / zdir16b.arc / ZDIR16B.DOC < prev   
Encoding:
Text File  |  1989-09-28  |  7.8 KB  |  191 lines

  1. ZDIR.COM    - A ZIP utility from Toad Hall            28 Sep 89
  2.           v1.6b
  3.  
  4. Updated to v1.6a by TapirSoft Gisbert W.Selke
  5. Updated to v1.6b (all of Gisbert's ideas gratefully accepted!) Toad Hall
  6.  
  7. Usage:  ZDIR [-v] filename[.ZIP] [member.typ] [-v | -m] [>output]
  8.     where    [-v]        verbose display (/V works also)        v1.6
  9.         [-m]        monosyllabic display (yeah, /M too)    v1.6a
  10.                 (Note -v and -m are mutually exclusive!) v1.6b
  11.         filename    name of target zip file(s) (wildcards ok)
  12.         [.ZIP]        optional file type (forced to .ZIP anyway)
  13.         [member.typ]    optional ambiguous ZIP member name
  14.                 (wildcards ok)
  15.         [>output]    optional output redirection (default:  CON:)
  16.  
  17. Results:
  18.  
  19.     In the default ('wide') mode, ZDIR outputs a 3-column listing of
  20.     the members of the target .ZIP file(s), to include compressed and
  21.     uncompressed file sizes (in Kb).  Short, sweet, to the point.
  22.  
  23.     If you include the -V verbose switch, ZDIR will output a more
  24.     detailed report (with one member file per line), and ZIP file
  25.     comments (if present).  ZIP member sizes and file count  will
  26.     be totalled and output, and the overall totals (for all ZIP
  27.     files processed if you designate more than one) will also be output.
  28.  
  29.     If you use -M instead, you'll get just one file per name,
  30.     complete with path et al., as stored in the Zip file. No sizes,
  31.     no dates; may be useful for piping into programmes. Beware of
  32.     the header lines and the Zip comment, though.            (v1.6a)
  33.  
  34.     C:>ZDIR A:*        will list contents of all .ZIP files
  35.                 on drive A:
  36.     C:\SUBDIR\> zdir *    will list contents of all .ZIP files
  37.                 in the current drive:\directory
  38.     C:\SUBDIR\> zdir f*.*    will list contents of all .ZIP files
  39.                 starting with 'F' in the current drive:\
  40.                 directory
  41.     C:>ZDIR * *.asm        will look in all .ZIP files in current
  42.                 drive:\directory, and list member files
  43.                 that have an '.ASM' file type.        v1.1
  44.     C:>ZDIR -v * *.asm    same thing, but verbose display        v1.3
  45.     C:>ZDIR d:\foo\f* *.COM will look in all .ZIP files starting with
  46.                     'F' in D:\FOO\, and list member files
  47.                 whose names begin with 'C' and have a
  48.                     '.COM' file type.            v1.1
  49.     C:>ZDIR \asm\zdir11 zdir1?.asm
  50.                 will look in ZDIR11.ZIP in \ASM\, and list
  51.                 member files ..... yeah, that weird single-
  52.                 character wildcard.  You get the idea.. v1.1
  53.  
  54.  
  55. Limitations:
  56.  
  57.     None reported.
  58.  
  59.  
  60. Notes:
  61.  
  62.     You'll notice ZDIR's display is more like the other file
  63.     compressors out there.  (I don't have legal problems with SEA
  64.     to worry about .. so WHAT if it resembles their ARC's display!)
  65.     I WANT the file name at screen left .. and am NOT concerned at
  66.     this time about extended file names .. so ZDIR's display is
  67.     NOT like PKZIP's.
  68.  
  69. Plans:  Add DIR-like functioning with compatible switches:
  70.  
  71.         ZDIR        Produce a listing of the target .ZIP file
  72.                 contents identical to a DIR listing.
  73.                 Member dates, times, byte sizes (uncompressed).
  74.  
  75.         ZDIR -W        Just like a DIR /W (wide) listing.  No sizes,
  76.                 dates, etc.
  77.  
  78.     Eventually a "ls"-compatible utility, providing all the functionality
  79.     and switches of the Unix-compatible ls utility.
  80.  
  81.     Add ARC/PAK display capability as well as ZIP files.
  82.  
  83.     Contemplating a non-DOS output of the ZIP file comments
  84.     (to eliminate any chance of ANSI command sequences turning out
  85.     to be keyboard macros AKA viri).  However, then the comments
  86.     wouldn't go to StdOut anymore .. sigh ..
  87.  
  88. Credits:
  89.  
  90.     Compliments to the unknown author of ADIR.EXE (snarfed long ago from
  91.     who knows where, no source) for his wildcard functions.  (Though NO
  92.     thanks to him for not releasing the source.  It was buggy anyway.
  93.     Watch this space for the upcoming release of an improved ADIR
  94.     (with assembly language source, of course).
  95.  
  96.     Thanks to PKWARE for the details on the ZIP directory structure.
  97.  
  98.     No thanks to ANYONE for not providing a nice clean filename expander
  99.     that would give me full filename parsing for ZIP members, to include
  100.     paths!  Jeez, what a hack!
  101.  
  102. Constraints:
  103.     None.  Released to the public domain.
  104.  
  105.     David P Kirschbaum
  106.     Toad Hall
  107.     kirsch%braggvax.ARPA@cacfs.army.mil    (right now)
  108.     kirsch@arsocomvax.socom.mil        (some day)
  109.  
  110. Significant version changes:
  111.  
  112. v1.6b    Toad Hall again
  113.     - GWS's code immediately adopted (great ideas!).
  114.     - Removed old commented-out code (from v1.5, v1.6, v1.6a, etc.)
  115.     - Formal release from Toad Hall as v1.6b.
  116.  
  117. v1.6a    GWS (yeah, hacking away in West Germany's capital village)
  118.     strikes again
  119.     - Cleaning up verbose display:
  120.       Some columns were one off. Also, change name alignment slightly.
  121.     - Added /m ('monosyllabic') command line switch:
  122.       This will show full names, paths'n'all, as stored in the Zip,
  123.       one per line, and nothing else. May be nice for piping into
  124.       other programmes. - Beware of the header lines, though.
  125.  
  126. v1.6    - v1.4a Changes:
  127.       Gisbert Selke (all the way from Germany, I think) tweaked the
  128.       earlier v1.4 code.  (See the v1.4a comments).
  129.       I kept his changes (that I hadn't already added in v1.5 myself),
  130.       incorporating them into the v1.5 code.  (Of course, just HAD to tweak
  131.       his changes as well!)
  132.       Nice to see he didn't catch the bugs in v1.4!  Makes me feel
  133.       slightly less stupid.
  134.     - Member filenames:
  135.       In verbose output, I'm still considering shifting filenames to the
  136.       right hand side of the screen.  That would permit long (path)
  137.       filenames to be displayed/output (with screen wraparound handling
  138.       the weird, extra-long ones).  I believe that's why the PKZIP author
  139.       (Katz) formatted his display that way.  But the member names on the
  140.       right is NOT convenient to me!  Leaving it the original way (member
  141.       file names on the left).  Someday, when we decide to display
  142.       file paths as well as names, we'll probably have to do that.
  143.       (Or display paths separately on the right .. or whatever ..
  144.       Whaddya want, outside world?  Give me your opinions.)
  145.     - Considering parsing the ZIP file comments for ANSI command
  146.       sequences (to trap those viruses that try to reassign your
  147.       keyboard to delete your hard disk, etc., via a ZIP file
  148.       comment).  Not yet.
  149.  
  150. v1.4a    - TapirSoft Gisbert W.Selke: Allow '/' as switch char, for them
  151.       die-hard DOS people like myself. Display rrrrrreal 4-byte CRCs.
  152.       Add text for 'Imploded'.
  153.  
  154. v1.5    - Added the "implode" compression style to verbose display,
  155.       plus traps for unknown compression types.
  156.     - Added an "E" encryption flag to verbose display.
  157.     - Display shows a "+" (in verbose as well as nonverbose mode)
  158.       if member file names include paths.
  159.       (We are NOT displaying full paths yet.)
  160.     - Squashed some bugs.  (See .ASM for details)
  161.  
  162. v1.4    - Increased the offset (from ZIP file end) where ZDIR starts to
  163.       look for the ZIP central directory.  Seems some BBS's are adding
  164.       huge advertising billboards as comments.
  165.  
  166. v1.3c    - Never tested for no cmdline args at all, and the new args
  167.       command line parser went into never-never land!  Sloppy testing!
  168.       Fixed, and thanks to FAAR RBBS for alerting me.
  169.  
  170. v1.3b    - 1.3a broke member file testing.  Squashed the bugs (harder
  171.       this time) with completely rewritten command line parsing.
  172.       (Donno HOW it got past testing!)
  173.       Now you can put the '-v' verbose switch before or after
  174.       file names and wild cards.
  175.  
  176. 1.3a    - Bumped file end reading up to 256 bytes to insure we can handle
  177.       ZIP files that might have been padded (rounded up to 128 bytes)
  178.       by XMODEM and other unmannerly file transfer systems and utilities.
  179.     - Adding ZIP file comment display.
  180.  
  181. v1.3    - Adding '-v' verbose display via cmdline switch.  Code snarfed from
  182.       my hack at QBARCV.ASM (an ARC/PAK/ZIP lister for QuickBasic and
  183.       RBBS).
  184.  
  185. v1.2    - Replaced brute force (reading a 5Kb hunk of the file end into a
  186.       buffer and searching for central directory start) with a more
  187.       elegant solution: read in the end directory structure and find
  188.       the file pointers to the central directory there.
  189.  
  190. v1.1    - I forget.
  191.