home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / sharewar / jar / jar101dx.exe / JAR.DOC < prev    next >
Text File  |  1997-02-03  |  120KB  |  2,990 lines

  1.  
  2.     USER'S MANUAL FOR THE JAR ARCHIVER PROGRAM             January 1997
  3.  
  4.  
  5.     TOPICS COVERED IN THIS DOCUMENT
  6.     -------------------------------
  7.  
  8.     MAJOR FEATURES OF JAR
  9.     ARCHIVER BENCHMARKING
  10.     INSTALLATION
  11.     QUICK START TO USING JAR
  12.     CONVERTING OTHER ARCHIVE FILES TO JAR FORMAT
  13.     HOW TO USE JAR
  14.     IMPORTANT NOTES
  15.     USING JAR AS A BACKUP PROGRAM
  16.     JAR ERROR SITUATIONS
  17.     HOW JAR USES AVAILABLE MEMORY
  18.     ARCHIVE CHAPTERS
  19.     JAR USER ACTION PROMPTS
  20.     JAR COMMAND LINE SYNTAX
  21.     JAR COMMANDS
  22.     JAR SWITCH OPTIONS
  23.     CONFIGURATION FILE
  24.     CONFIGURATION FILE KEYWORDS
  25.     IMPORTANT DIFFERENCES BETWEEN JAR AND ARJ
  26.     JAR LIMITATIONS
  27.     JAR ARCHIVE ACCESS MODES
  28.     JAR ARCHIVE FLAGS
  29.     JAR ERROR LEVELS
  30.     FINAL COMMENTS
  31.  
  32.  
  33.     MAJOR FEATURES OF JAR:
  34.  
  35.  
  36.       JAR comes as a 16-bit executable (JAR16.EXE) for DOS and a 32-bit
  37.       executable (JAR32.EXE) for Windows 95 and Windows NT (version 3.50 or
  38.       higher). The latter takes full advantage of 32-bit instructions and
  39.       the "flat" memory model. Sometimes this 32-bit executable is referred
  40.       to as the "Win32 JAR version".
  41.  
  42.       Currently, JAR ranks as one of the best in compression in terms of
  43.       size reduction of the currently available archivers.  JAR compresses
  44.       significantly better than such popular archivers as PKZIP 2.04, UC2
  45.       rev 3, RAR 1.55, RAR 2, and LHA.  JAR uses a modified form of SOLID
  46.       archive technology to provide excellent compression, fast updates
  47.       and fast extraction.
  48.  
  49.       The ability to process and archive more than 50,000 files at one
  50.       time.
  51.  
  52.       JAR provides the CHAPTERS concept which allows one to store multiple
  53.       backups in the same archive using incremental compression.
  54.  
  55.       Archive individual file or chapter comments with the option of
  56.       inputting comments from a file.
  57.  
  58.       Support of ANSI style comments.
  59.  
  60.       JAR has MS-DOS international language support for the proper casing
  61.       of filenames.
  62.  
  63.       The ability to put the entire JAR command line in a response type
  64.       file as in "JAR @command.rsp".  Supports nested response files.
  65.  
  66.       32 bit CRC file integrity check.
  67.  
  68.       Total percentage milestone display for the entire archive build.
  69.  
  70.       Option to test new archive before overwriting the original archive
  71.       including the option to do a byte for byte file compare during a
  72.       build.
  73.  
  74.       Archives that can span diskettes. This allows the user to backup a
  75.       full hard disk drive to multiple floppies.  Recovery of individual
  76.       files is convenient because the JAR archive header keeps information
  77.       about the disk location of each file.
  78.  
  79.       Built-in facility to recover files from broken archives. Also, the
  80.       capability to add recovery records to important archives which allow
  81.       one to repair damaged archives.
  82.  
  83.       Internal integrity check in JAR to resist hacking or virus attacks.
  84.  
  85.       Archive security envelope "seal" feature to resist tampering with
  86.       secured archives. This feature disallows ANY changes to a secured
  87.       archive.
  88.  
  89.       Archive and chapters locking feature.
  90.  
  91.       Password option to protect archived files both using authentication
  92.       or encryption.
  93.  
  94.       Specification of the files to be added to or exclude from an archive
  95.       via one or more list files. In addition, JAR can generate a list
  96.       file.
  97.  
  98.       Specification of files to be excluded from processing by JAR.
  99.  
  100.       Special command to test JAR reliability. "testjar.bat" is a
  101.       ready-to-use batch file for testing on specified drive.
  102.  
  103.       Optional long filenames translation into short names when extracting
  104.       files in DOS.
  105.  
  106.       Configuration file which allows the customization of default JAR
  107.       behavior. Includes a set of default options for each command.
  108.  
  109.       Breaks 640K DOS barrier using EMS and/or XMS.
  110.  
  111.       Query option when wildcard selection is not suitable.
  112.  
  113.       Files sorting in list commands.
  114.  
  115.       32-bit JAR version allows the use or storage of both long and/or
  116.       short filenames. It uses filenames compatible with DOS OEM encoding.
  117.  
  118.  
  119.     ARCHIVER BENCHMARKING:
  120.  
  121.  
  122.       Benchmarking results are very dependent upon the data used for the
  123.       tests.  We compared JAR with some of the leading commercial
  124.       archivers: PKZIP 2.04g, UltraCompressor II Version 3, RAR 2.00 for
  125.       Win32, and RAR 2.00 for DOS.  LHA 2.X and ARJ 2.X are not included.
  126.       Their compression size numbers are very similar to those of PKZIP
  127.       2.04g.
  128.  
  129.       COMPUTER: Pentium-100, 24MB memory, no external cache
  130.       OPERATING SYSTEM: Windows 95
  131.       CONFIG.SYS:
  132.          device=c:\win95\himem.sys
  133.          dos=high
  134.          files=40
  135.          devicehigh=c:\dos\power.exe
  136.       JAR.CFG:
  137.          32MemoryLimit=10240
  138.          CheckAvailableMemory=No
  139.  
  140.       The only exception is JAR16.EXE which was tested in DOS 6.22 with 16M
  141.       of EMS memory.  This was due to the slow Windows 95 EMS
  142.       implementation which decreases JAR's performance relative to the
  143.       amount of EMS used (up to 1.5 times).   We recommend the use of
  144.       JAR32.EXE in Windows 95 and Windows NT.
  145.  
  146.  
  147.       FILE SET:  The Calgary Corpus (18 files totaling 3,251,493 bytes,
  148.       popular file set used to compression rates).
  149.  
  150.       Archiver              Method      Compression time  Compressed size
  151.  
  152.       JAR32                 Maximum           31s           903,863  (100%)
  153.       JAR32                 Default           21s           910,676  (101%)
  154.       JAR16 under DOS 6.22  Maximum           41s           935,675  (104%)
  155.             with 16MB EMS
  156.       JAR16 under DOS 6.22  Default           29s           945,690  (105%)
  157.             with 16MB EMS
  158.       RAR 2.00              -m5 -mde -s      261s           951,992  (105%)
  159.       RAR 2.00              Default solid     48s           997,418  (110%)
  160.       RAR 2.00              Default           41s         1,008,455  (112%)
  161.       RAR 2.00 for DOS      Default solid     25s         1,030,894  (114%)
  162.       UC2 rev 3             Default           30s         1,051,516  (116%)
  163.       PKZIP 2.04            Default           17s         1.074,550  (119%)
  164.  
  165.  
  166.       FILE SET:  Microsoft Visual C++ 1.52 (462 files and directories
  167.       totaling 18,806,153 bytes, mix of executables, text, DLLs, and object
  168.       files).
  169.  
  170.       Archiver              Method      Compression time  Compressed size
  171.  
  172.       JAR32                 Maximum          264s         5,984,311  (100%)
  173.       JAR16 under DOS 6.22  Maximum          341s         6,279,415  (105%)
  174.             with 16MB EMS
  175.       RAR 2.00              -m5 -mde -s     1004s         6,351,777  (106%)
  176.       JAR32                 Default          173s         7,050,008  (118%)
  177.       JAR16 under DOS 6.22  Default          250s         7,267,567  (121%)
  178.             with 16MB EMS
  179.       RAR 2.00              Default solid    273s         7,856,362  (131%)
  180.       RAR 2.00 for DOS      Default solid    151s         8,314,078  (139%)
  181.       UC2 rev 3             Default          190s         8,556,558  (143%)
  182.       PKZIP 2.04            -ex              140s         8,906,367  (149%)
  183.       PKZIP 2.04            Default           96s         8,945,476  (149%)
  184.  
  185.       JAR16/JAR32 shows its best compression with large directories of
  186.       files.
  187.  
  188.  
  189.     INSTALLATION:
  190.  
  191.  
  192.       This assumes that you have already executed the self-extracting
  193.       distribution archive and extracted its archived files into a
  194.       directory.
  195.  
  196.       To install the JAR software, simply copy JAR16.EXE, JAR32.EXE,
  197.       JAR.CFG, REARJ.EXE, REARJ.CFG and optionally JAR_C.COM, JAR_C.DLL
  198.       (available in non-export version only) to one of the directories
  199.       named in your DOS PATH statement found in your AUTOEXEC.BAT. On many
  200.       PCs, this directory may be C:\DOS or C:\BIN.
  201.  
  202.       In addition, for a DOS machine or for a DOS environment one MB of
  203.       available XMS strongly recommended.  Four MB of EMS preferred for
  204.       outstanding compression.  More memory is better.  Detailed
  205.       information about memory usage is available in section "HOW JAR USES
  206.       AVAILABLE MEMORY".
  207.  
  208.  
  209.     QUICK START TO USING JAR:
  210.  
  211.  
  212.       See the document INTRO.DOC.
  213.  
  214.  
  215.     CONVERTING OTHER ARCHIVE FILES TO JAR FORMAT:
  216.  
  217.  
  218.       Included with this software is the program REARJ.  This program can
  219.       be used to individually or collectively convert archive files from
  220.       other formats to the JAR format.  Read REARJ.DOC for more details.
  221.  
  222.  
  223.     HOW TO USE JAR:
  224.  
  225.  
  226.       If you type JAR16 [return], you will see a simple help screen.
  227.  
  228.       If you type JAR16 -? [return], you will see more detailed help
  229.       information.
  230.  
  231.       Please note that unless specifically indicated, references to JAR16
  232.       also include JAR32.EXE.
  233.  
  234.  
  235.     IMPORTANT NOTES:
  236.  
  237.  
  238.       When using the "-w" working directory switch, JAR does not check on
  239.       space availability before overwriting the original archive if it
  240.       exists. Be sure that you have enough disk space for the new archive
  241.       before using the "-w" switch. If JAR aborts in this situation because
  242.       of disk space, JAR will keep the temporary archive.
  243.  
  244.       Like ARJ and PKZIP, JAR requires extra disk space to UPDATE an
  245.       archive file. JAR will backup the original archive while it creates
  246.       the new archive, so enough room must be available for both archives
  247.       at the same time. Also JAR requires additional space for a swap file
  248.       which is used to store the archive header and a list of files to add
  249.       during processing.
  250.  
  251.       By default during an add command, JAR will ALSO add to the archive
  252.       all directories scanned while searching for matching filenames.  Even
  253.       if NO files were found, JAR will build an archive if any directories
  254.       were scanned during the operation.  See the "-hb" option for more
  255.       information.
  256.  
  257.       Currently, JAR will not extract overwriting a readonly file unless
  258.       the "-ha" option is specified.
  259.  
  260.       JAR uses a configuration file to store global user settings. By
  261.       default the configuration file is named "JAR.CFG" and must be placed
  262.       into the same directory as the JAR16.EXE and JAR32.EXE directory.
  263.  
  264.  
  265.     USING JAR AS A BACKUP PROGRAM:
  266.  
  267.  
  268.       JAR can be used as a substitute for a backup program.
  269.  
  270.       The following partial command lines illustrate a full backup command,
  271.       an incremental backup command, and a restore command. The only parts
  272.       missing are the names of the files to backup/restore.
  273.  
  274.       JAR16 a backup1 -jt -r -m4 -b0
  275.       JAR16 a backup2 -hba1 -b0 -jt -r -m4
  276.       JAR16 x backup2
  277.  
  278.       You may then copy archive into diskettes:
  279.  
  280.       JAR16 y backup -oa:backup -vvas -hk
  281.  
  282.       Or you may create backup directly on diskettes:
  283.  
  284.       JAR16 a a:backup -jt -r -m4 -b0 -hk -wc:\ -vvas
  285.  
  286.       You should familiarize yourself with the above switches so that you
  287.       can modify the above command lines as needed.
  288.  
  289.       Another possibility for incremental backups is to use chapter
  290.       archives:
  291.  
  292.       JAR16 ac chapters -ht1 -r -js1 -hl -hz
  293.  
  294.       To restore the last chapter use:
  295.  
  296.       JAR16 x chapters
  297.  
  298.       To restore any other chapter (in our example #5) use:
  299.  
  300.       JAR16 x chapters -jb5
  301.  
  302.       It may be useful to review chapter comments:
  303.  
  304.       JAR16 lc chapters
  305.  
  306.       We also recommend you test JAR reliability with your computer and
  307.       software using the JAR "test" command.  See TESTJAR.BAT.
  308.  
  309.  
  310.     JAR ERROR SITUATIONS:
  311.  
  312.  
  313.       ADD:
  314.  
  315.         If a user specified file is not found during an add, JAR will
  316.         continue processing. Note that files specified within an JAR
  317.         listfile that are not found during an add will NOT trigger an error
  318.         unless the "-hl" option is also specified.
  319.  
  320.         In a disk full condition or any other file i/o error, JAR will
  321.         promptly terminate with an error condition and delete the temporary
  322.         archive.
  323.  
  324.       MOVE:
  325.  
  326.         JAR will only delete files after all them have been successfully
  327.         added to the archive.
  328.  
  329.       EXTRACT:
  330.  
  331.         In a disk full condition or any other file i/o error, JAR will
  332.         promptly terminate with an error condition and delete the current
  333.         output file.
  334.  
  335.       CRC ERRORS OR BAD FILE DATA:
  336.  
  337.         In the case where an JAR archive has been corrupted, JAR will
  338.         report a CRC error or a Bad file data error. These corruptions can
  339.         be the result of an unreliable diskette, a computer memory problem,
  340.         a file transfer glitch, or incompatible CACHING software or memory
  341.         manager.
  342.  
  343.         Most of these errors are the result of file transfer glitches and
  344.         bad diskettes.
  345.  
  346.       CRITICAL ERROR HANDLER:
  347.  
  348.         JAR sets up an interactive critical error handler to handle DOS
  349.         critical errors like "sector not found" and "drive not ready". When
  350.         a critical error occurs, JAR will prompt the user with the message
  351.         "Retry Y/N?". The user may retry the failed operation by pressing
  352.         "Y". Pressing "N" will fail the operation. The user can press
  353.         Control BREAK to abort to DOS.
  354.  
  355.         There is an option to disable the critical error handler in the JAR
  356.         configuration file.
  357.  
  358.         JAR32.EXE doesn't have an interactive hardware error handler.
  359.  
  360.  
  361.     HOW JAR USES AVAILABLE MEMORY:
  362.  
  363.  
  364.       One of JAR's advantages is its ability to use additional memory for
  365.       better compression.  Unlike most other archivers the JAR DOS version
  366.       can use EMS or XMS to improve compression.
  367.  
  368.  
  369.       JAR DOS version
  370.  
  371.         JAR uses a fixed amount of XMS memory to cache its overlay code
  372.         (about 300K) and requires an additional 500K of XMS memory for
  373.         better performance. When JAR compresses data it first looks at
  374.         available EMS memory. If there are more than about 640 Kbytes EMS
  375.         and the compression method is -m2..-m4 then JAR allocates EMS and
  376.         uses it to improve compression. You may specify that JAR use up to
  377.         16384 Kbytes of this memory. The more EMS - the better compression
  378.         achieved, but JAR will work slower.
  379.  
  380.         If there is not enough EMS then JAR uses XMS instead. But "XMS
  381.         based" compression is significantly worse. JAR compression rate and
  382.         speed does not depend significantly on the XMS amount used. The
  383.         optimal value is less than 4 Mbytes. The JAR XMS engine consumes
  384.         about 60K more DOS conventional memory compared to the EMS engine.
  385.  
  386.         When extracting, JAR uses available XMS or EMS for faster
  387.         decompression. The recommended value for data that has been
  388.         compressed using the "-m2" and "-m3" method is 1.5 Mbytes of free
  389.         EMS and/or XMS, for the "-m4" method, use at least 3 Mbytes of free
  390.         EMS/XMS. With less memory JAR may use a swap file instead (this
  391.         results in worse performance).
  392.  
  393.         When both EMS and XMS are available JAR itself chooses the optimal
  394.         memory amount and type for the selected command.
  395.  
  396.         The JAR DOS version requires EMS 4.0+ and XMS 2.0+ versions.
  397.  
  398.         Although the JAR DOS version achieves significantly better
  399.         compression and uses less memory with EMS available, special care
  400.         is required to ensure that the EMS driver (such as EMM386.EXE) is
  401.         configured and works properly.
  402.  
  403.         The EMS driver works in a more "complex" way than XMS. It searches
  404.         for a "hole" in DOS address space for the page frame. Usually it
  405.         also works with 386+ memory paging enabled. As result some older
  406.         DOS software or hardware may conflict with the EMS driver. Refer to
  407.         your memory manager documentation for details. We strongly
  408.         recommend that you ensure that DOS JAR works reliably with EMS
  409.         enabled using the "test" command. If you detected problems then you
  410.         must disable EMS usage using "EmsLimit=0" in the JAR configuration
  411.         file.
  412.  
  413.         When running JAR in Windows 3.X or OS/2 be sure the PIF file/DOS
  414.         session settings allow JAR to use EMS and XMS. By default XMS and
  415.         EMS usage may be limited to 1 Mbyte. We recommend increasing these
  416.         settings to 4 Mbytes or more.
  417.  
  418.  
  419.       JAR Win32 version
  420.  
  421.         JAR for Win32 requires about 1 Mbyte of memory for executable and
  422.         data. The compression engine may use additional free memory for
  423.         better compression since more available memory allows the JAR
  424.         compression engine to match strings at larger offset distances.
  425.  
  426.         Very good compression is achieved when JAR uses 3-4 Mbytes of
  427.         memory. 8-10 Mbytes gives the best compression. JAR may use less
  428.         memory (0.5-3 Mbytes) for good compression, too.
  429.  
  430.         The JAR Win32 version works significantly faster and compresses
  431.         better than the DOS version. So in Windows NT and Windows 95, you
  432.         should use the Win32 JAR version. In DOS, Windows 3.X and OS/2 -
  433.         use the DOS JAR version.
  434.  
  435.  
  436.       Both versions
  437.  
  438.         The simplest way to tune JAR memory usage is to set
  439.         "CheckAvailableMemory=Yes" in the configuration file. Then JAR
  440.         detects the free physical memory currently available and uses it.
  441.         Note that JAR never uses more memory than the limits that are set
  442.         in the configuration file ("XmsLimit", "EmsLimit", "32MemoryLimit")
  443.         even if there is actually more free memory. If
  444.         "CheckAvailableMemory=Yes" you may use very large limit settings
  445.         (e.g., 8192 Kbytes each).
  446.  
  447.         Experienced users may set "CheckAvailableMemory=No" and then
  448.         specify the "real" memory amounts in "XmsLimit", "EmsLimit",
  449.         "32MemoryLimit". Be sure that the memory specified is really
  450.         available; otherwise, in operating systems as Windows 95, Windows
  451.         NT, OS/2, intensive memory swapping may occur which will decrease
  452.         overall system performance. "CheckAvailableMemory=No" is also
  453.         recommended for batch processing. But again SPECIFY MEMORY AMOUNTS
  454.         that ARE REALLY AVAILABLE. It is better to specify a smaller memory
  455.         amount than wait for hours due to swapping.
  456.  
  457.         The EMS implementation in Windows NT is slow. So for good
  458.         compression do not use the JAR DOS version. Use the JAR Win32
  459.         version instead.
  460.  
  461.  
  462.     ARCHIVE CHAPTERS
  463.  
  464.  
  465.       The advantage of a chapter archive over a series of separate archives
  466.       of the same set of files is that space can be saved when files to be
  467.       archived do not change or change slightly. One chapter archive can
  468.       produce the same results as one hundred standard archive backups. In
  469.       other words, one can update a chapter archive one hundred times and
  470.       fully recover any one of those updates.
  471.  
  472.       Technically speaking, each file in a chapter archive has a chapter
  473.       lifespan range. When a file is backed up and has not changed since
  474.       the last backup, only the lifespan range is changed. A copy of the
  475.       file is NOT added to the archive since a copy already exists. If the
  476.       backed up file is different from the previous version, that file is
  477.       added to the archive with an appropriate chapter range. The previous
  478.       version of the file is still kept in the chapter archive.  When a
  479.       particular chapter is restored, JAR selects only the files whose
  480.       lifespan includes the chapter number requested. As an example,
  481.       suppose one made a series of daily chapter backups of a document
  482.       directory where only one document out of the one hundred documents
  483.       changes on a daily basis. The chapter archive would contain the
  484.       original one hundred documents plus a copy of each day's changed
  485.       document.
  486.  
  487.       JAR provides a lot of services for chapter management: keeps chapter
  488.       creation/modification time, allows commenting or locking, can extract
  489.       a specified chapter and also, subsequent changes to it.
  490.  
  491.       EXAMPLE
  492.  
  493.         Suppose you started to develop a new programming project and
  494.         decided to use a JAR chapter archive for backups.
  495.  
  496.         The project directory is "c:\prj\", so you have written a
  497.         special "back.bat" with the command line:
  498.  
  499.         JAR16 ac archive c:\prj\*.* -r -x*.obj -x*.exe -jt
  500.  
  501.         You are not interested in object or exe file backups so they are
  502.         excluded. "-jt" stands for temporary archive testing after each
  503.         update.
  504.  
  505.         After some coding you have completed the "main.h" file. "back.bat"
  506.         adds this file into first archive chapter.
  507.  
  508.         Next thing you have completed is the "main.c" file.  The second run
  509.         of "back.bat" detects that there is no change to "main.h" since the
  510.         previous chapter as file size and modification time have not
  511.         changed. So JAR compresses only the new "main.c" file.  As noted
  512.         before each file has a chapter lifespan range.  In your archive
  513.  
  514.         main.h lifespan range became from 1 to 2  ("<1-2>" in JAR notation)
  515.         main.c - " - " -             from 2 to 2  ("<2-2>" in JAR notation)
  516.  
  517.         Obviously JAR saved additional space as it did not compress and
  518.         save main.h twice.
  519.  
  520.         JAR16 x archive -jb1
  521.  
  522.         extracts file(s) which are included in the first chapter. That is
  523.         only "main.h". The "-jb1" option is used to select chapter #1.
  524.  
  525.         JAR16 x archive -jb2
  526.  
  527.         extracts the second chapter: both "main.c" and "main.h". The same
  528.         result occurs when extracting without the option "-jb2" since JAR
  529.         by default extracts (or lists/updates) the last chapter in the
  530.         archive.
  531.  
  532.         Next step is a bug fix in file "main.h" and another backup.
  533.         JAR detects the change of "main.h" and no changes to "main.c". So now
  534.         the archive contains 3 files:
  535.  
  536.         main.c <2-3>   main.h <1-2>   main.h <3-3>
  537.  
  538.         (can be listed using   JAR16 ls archive -jb1-3 )
  539.  
  540.         Yes, there are two files named "main.h". However, the first one
  541.         belongs to chapters 1 and 2 while the second belongs to chapter 3
  542.         only.  So with the "-jb" option you can fully reconstruct any of these
  543.         chapters.
  544.  
  545.         If you used separate archives for each backup then they would
  546.         contain now 1+2+2=5 files (instead of only 3 files in chapters
  547.         case).  Moreover, in the case of chapter archives JAR optimizes the
  548.         compression as it detects that  main.h <1-2>  and  main.h <3-3>
  549.         do not differ very much, so it compresses only the difference
  550.         between them.
  551.  
  552.         Suppose two days later your project contains 20 files. And chapter
  553.         archive contains 30 updates. You can list or extract any of them.
  554.         Archive is still very small as JAR compresses only changes between
  555.         chapters. If you used 30 separate archives instead of a single
  556.         chapter archive, they would occupy probably 10 times more disk space.
  557.  
  558.         Suppose you noted that somewhere in the previous backups that an
  559.         important piece of code was deleted from "main.h".  You don't need
  560.         to search all 30 archives for this code!
  561.  
  562.         JAR16 e archive main.h -jb1-30
  563.  
  564.         extracts "main.h" from chapters 1-30 each into separate
  565.         directories. Chapters where "main.h" has not been changed are
  566.         skipped. The directory name is generated by enclosing in brackets
  567.         the lifespan start number.  As a result JAR extracts like this:
  568.  
  569.         main.h <1-2>    to   (1)\main.h
  570.         main.h <3-15>   to   (3)\main.h
  571.         main.h <16-30>  to   (16)\main.h
  572.  
  573.         You need to review only these 3 files to find the required code as
  574.         all other chapters contain duplicates. Upon a successful search you
  575.         may decide to comment chapter 3 with a special note about the useful
  576.         code using the:
  577.  
  578.         JAR16 c archive -jb3 -hz
  579.  
  580.         command.
  581.  
  582.         So the main advantage of chapters archive is compact and convenient
  583.         storage of many updates within single archive.  There is easy
  584.         access to any chapters. And of course, there is major disk space
  585.         savings compare to multiple separate backups.  Even if you decide
  586.         to start a new archive backup after the 100'th chapter, your
  587.         savings in compressed size will be outstanding.
  588.  
  589.       END OF EXAMPLE
  590.  
  591.       Please read the "ac", "lc" commands, "-js" and "-jb" options for
  592.       further information about chapters.
  593.  
  594.  
  595.     JAR USER ACTION PROMPTS:
  596.  
  597.  
  598.       JAR prompts the user for action at certain times. There are several
  599.       types of prompts. One is for yes/no permission, another is for a
  600.       new filename, another is for archive comments.
  601.  
  602.       The JAR yes/no user prompts provide a lot of flexibility. In
  603.       addition to the normal yes and no responses, JAR also accepts the
  604.       following responses: quit, always, skip, global, and command.
  605.  
  606.       "Global" sets JAR to inhibit all subsequent user prompts by
  607.       assuming YES for all queries as if "-y" were specified.
  608.  
  609.       "Always" sets JAR to assume YES for subsequent queries of the same
  610.       class. For example, answering ALWAYS to the overwrite query will
  611.       assume YES for ALL subsequent overwrite queries.
  612.  
  613.       "Skip" sets JAR to assume NO for ALL subsequent queries of the same
  614.       class.
  615.  
  616.       "Command" prompts for one DOS command and then executes it. JAR
  617.       then returns to expect an answer to the current yes/no query. Do
  618.       not install a TSR program using this command prompt as JAR may not
  619.       have enough memory left to continue execution.
  620.  
  621.       Abbreviated responses such as "y", "n", "g", "a", "s", "c" are
  622.       allowed.
  623.  
  624.  
  625.     JAR COMMAND LINE SYNTAX:
  626.  
  627.  
  628.       JAR{16|32} <command> [<switch>...] <archive_name>[.j] [<arguments>...]
  629.  
  630.       <arguments> ::= <switch> | <wildcard> | <filename> | <list_file> |
  631.                      <response_file>
  632.  
  633.       <switch> ::= {'/'|'-'}<switch_character>['-'|<option>]
  634.  
  635.       <list_file> ::= '!'<filename>
  636.  
  637.       <response_file> ::= '@'<filename>
  638.  
  639.       Commands and switches can be entered in upper or lower case.
  640.       Command is the first non-switch argument.
  641.  
  642.       JAR supports the use of either "-" or "/" as the switch option
  643.       character. You may mix them.
  644.  
  645.       -s        turns on switch "s"
  646.       -s-       turns off switch "s"
  647.       -sname    provides the name argument for switch "-s".
  648.  
  649.       Wildcards or filenames with spaces must be quoted:
  650.  
  651.       "c:\Program files\*" or
  652.       c:\"Program files"\*
  653.  
  654.       Wildcards or filenames that can be parsed as a switch option must
  655.       be quoted, too. JAR parses a switch option until the first quote.
  656.       The remaining part may only be a switch argument:
  657.  
  658.       -x     is switch
  659.       "-x"   is filename
  660.       -x-    turns off "-x" option
  661.       -x"-"  excludes filename "-"
  662.       -"x-"  reports error as "-" is not followed by a switch character
  663.              (instead argument 'x-' is supplied)
  664.  
  665.       If you need to specify a quote character as an argument then you
  666.       must specify two consecutive quotes (and argument itself must be
  667.       quoted too):
  668.  
  669.       JAR16 a test -g123""""4567  or
  670.       JAR16 a test -g"123""4567"
  671.  
  672.       in both cases password
  673.  
  674.       1234"4567
  675.  
  676.       is specified.
  677.  
  678.       Switch options can be combined to save command line length.
  679.       However, some switch options take optional string arguments and
  680.       therefore, must be the last option in a combined argument token
  681.       string because JAR accepts the rest of the argument token as the
  682.       optional argument. You can combine "-r" and "-y" to make "-ry". You
  683.       can combine "-wd:\" and "-r" with "-rwd:\", because the switch
  684.       option taking the string argument is last. Please note that
  685.       switches that only accept the "-", "0", "1", "2" modifiers can be
  686.       combined in any order.
  687.  
  688.       WARNING:  The "j" in "-jX" option switch is a SHIFT symbol.
  689.       Therefore, a combined "-jftl" is a combination of "-jf", "-jt", and
  690.       "-jl", since the "j" shifts the meaning of subsequent symbols in
  691.       the argument token string.
  692.  
  693.       Examples: -ryjftl   <=>  -r -y -jf -jt -jl
  694.                 -b1ywd:\  <=>  -b1 -y -wd:\
  695.  
  696.       The "h" is another SHIFT symbol.
  697.  
  698.       The standard JAR file suffix is ".j".
  699.  
  700.       The JAR archive name must be the first filename on the command line
  701.       after the command. The switches and other filenames can be in any
  702.       order.
  703.  
  704.       Wild names follow the Windows 95 (NOT DOS!) convention.
  705.  
  706.       Examples: "*" or "*.*" means all files
  707.                 "*.DOC"      means all files with an extension of ".DOC"
  708.                 "?B*"        means all files with a second character of "B"
  709.                 "??"         means all two character length filenames
  710.                 "*1*"        means all names that contains character "1"
  711.                 "*.*.*"      means all names that contain two "." characters
  712.  
  713.       NOTE: There are minor differences with Windows NT wildcard
  714.       matching. JAR interprets a wildcard (?) as "any character" instead
  715.       of "zero or one character".
  716.  
  717.       The default for <wild_name> for all commands except for "d" is "*".
  718.       The argument "" may be used as the wildcard that never matches any
  719.       files.
  720.  
  721.       You can supply one or more filenames for files containing lists of
  722.       files to be added to an archive. The filenames must be listed one
  723.       per line. The list filename(s) must be prefixed with "!" as in
  724.       "!listfile".
  725.  
  726.       You can also build a long command line using response files.  The
  727.       response file is "included" into the command line at the specified
  728.       place. Multiple and nested response files are allowed. The command
  729.       line may be split over as many lines as necessary.
  730.  
  731.       Example: JAR16 a archive @switches.txt @wildcards.txt
  732.  
  733.  
  734.     JAR COMMANDS:
  735.  
  736.  
  737.       a: Add files to archive
  738.  
  739.         This is the basic command to add disk files to a JAR archive. If
  740.         you specify the "-r" switch (recurse subdirectories), JAR will add
  741.         all of the files in all of the subdirectories that match the
  742.         specified wildname.  Along with these files JAR also will add all of
  743.         the scanned subdirectories.
  744.  
  745.         Note that this last action is similar to UC2 but different from ARJ
  746.         behavior.  See the "-hb" option for more information.
  747.  
  748.         Examples: JAR16 a archive subdir\*
  749.                   Archive all files in directory "subdir".
  750.  
  751.                   JAR32 a archive "c:\Program files\*" -r
  752.                   Archive all files in directory "Program files" and
  753.                   subdirectories.
  754.  
  755.         NOTE: Both DOS and Win32 JAR versions ALWAYS use Windows 95 like
  756.         wildcard matching style. This means that "subdir\*" works like
  757.         "subdir\*.*". The wildname "subdir\*." selects files without
  758.         extension.
  759.  
  760.         After add and listing commands with all files selected JAR shows
  761.         the total archived data ratio. This ratio does not include JAR
  762.         headers and recovery records. Only "pure" compressed data.
  763.  
  764.         JAR compresses archive header. As a result whole archive size
  765.         differs time to time even when compressing the same data.
  766.  
  767.  
  768.       ac: Add new Chapter
  769.  
  770.         The "ac" command works like the "a" command, but adds files into a
  771.         newly created chapter. JAR manages an almost unlimited number of
  772.         chapters.
  773.  
  774.         See the "-js" option for IMPORTANT DETAILS about methods on how
  775.         files are added to a new chapter.
  776.  
  777.         Example: JAR16 ac archive subdir\*
  778.                  Add all files in the directory "subdir" into new chapter
  779.  
  780.         JAR uses two compression methods. The "solid" method is used to
  781.         compress files in the usual manner.  The "version" method is used
  782.         to compress files with the same path but within different chapters.
  783.         This method is optimized to compress only the DIFFERENCES between
  784.         files while updating from chapter to chapter.
  785.  
  786.         NOTE: The current JAR version supports "version" compression method
  787.         only for files with a size less than about 500 Kbytes.
  788.  
  789.         "Version" compression also allows faster updates to an archive. The
  790.         only exception is the first time that a new file version is
  791.         compressed. In this case JAR must change the compression method
  792.         used for the file (from "solid" to "version") and this takes
  793.         additional time. The next version update will be significantly
  794.         faster.
  795.  
  796.         See the "-jb" option for more details how to extract or list chapters.
  797.  
  798.  
  799.       c: Comment archive files
  800.  
  801.         This command allows you to comment the archive header or individual
  802.         files or archive chapters. JAR will prompt you for each comment.
  803.         The user will be prompted for up to 50 lines for each comment. A
  804.         line containing only a [return] will terminate the comment. The
  805.         user can choose to input comment data from a file by entering the
  806.         comment filename preceded by an "!" as in "!archive.txt" starting
  807.         in column 1 of the first comment line. This file is read as a text
  808.         file. Only the first 4096 bytes of the file will be accepted by
  809.         JAR.
  810.  
  811.         To erase a comment from an archive, type [space] [return] on the
  812.         first comment line and [return] on the second comment line.
  813.  
  814.         To add file comments but not archive comment, use following
  815.         command:
  816.  
  817.         JAR16 c archive
  818.  
  819.         To add the archive comment but not file comments, use the following
  820.         command:
  821.  
  822.         JAR16 c archive -z
  823.  
  824.         To add only the archive comment at the command line, use the
  825.         following command:
  826.  
  827.         JAR16 c archive -zcomment.txt
  828.  
  829.         To remove a comment via the command line, use predefined "NUL"
  830.         filename:
  831.  
  832.         JAR16 c archive -zNUL
  833.  
  834.         You may also comment an archive with other update commands:
  835.  
  836.         JAR16 a -zcomment.txt archive *.txt
  837.  
  838.         JAR allows the storing of ANSI style comments. While displaying
  839.         these comments JAR itself emulates ANSI.SYS driver behavior in a
  840.         virtual screen and then dumps the complete picture to the output.
  841.         NOTE: The virtual screen is two columns narrower than the current
  842.         "real" screen.
  843.  
  844.  
  845.       cfg: extract default configuration file
  846.  
  847.         This command accepts a single argument - destination filename. If
  848.         it is omitted, JAR extracts the configuration file as "jar.cfg".
  849.  
  850.         This command is useful if the configuration file is missing or
  851.         damaged.
  852.  
  853.  
  854.       d: Delete files from archive
  855.  
  856.         This command allows you to delete files from the archive. When
  857.         wildcard selection is not suitable, you can use the "-q" switch to
  858.         set JAR to prompt you for deletion for each file selected. These
  859.         deleted files are physically removed from the archive.
  860.  
  861.         Examples: JAR16 d archive *.c
  862.                   Delete all files in archive ending in ".c"
  863.  
  864.                   JAR16 d -q archive *.c
  865.                   Prompt before deleting each file ending in ".c".
  866.  
  867.         Even if JAR removes all the files, the empty archive WILL NOT be
  868.         deleted.
  869.  
  870.         You can specify the "-n" (new) option to delete the files in the
  871.         archive that DO NOT EXIST on the disk. Then the "-o" option may be
  872.         used to specify the directory to scan.
  873.  
  874.         Example: JAR16 d archive *.* -n
  875.  
  876.  
  877.       da: Delete files in All chapters
  878.  
  879.         Delete the specified files in all chapters while showing the
  880.         deleted files with the corresponding chapter lifespan ranges. The
  881.         arguments are the same wildcards as used with the "d" command.
  882.  
  883.         Example: JAR16 da archive *.c
  884.                  Deletes all files in all chapters ending in ".c".
  885.  
  886.  
  887.       dc: Delete Chapters
  888.  
  889.         Delete chapters in the specified range. The command arguments are
  890.         chapter range "1-", "-2", "1-5" like. The "-x" option may be used
  891.         to exclude a range. Each file's chapter lifespan range is modified
  892.         with regard to the existing chapters. If there are no remaining
  893.         chapters then the file is removed.
  894.  
  895.         Examples: JAR16 dc arch 5 6 8            deletes chapters 5, 6 and 8
  896.                   JAR16 dc arch 5-8 11-12 -x6-7  deletes chapters
  897.                                                    5, 8, 11, 12
  898.                   JAR16 dc arch "-10"            deletes first ten chapters
  899.                   JAR16 dc arch 10-              deletes all chapters
  900.                                                    from 10 and above
  901.  
  902.  
  903.       e: Extract files from archive
  904.  
  905.         This command will extract one or more files from the archive to the
  906.         current directory or to the output directory if specified. JAR will
  907.         prompt the user before overwriting existing files unless the user
  908.         specifies the "-y" switch. If the user gives a "no" answer, JAR
  909.         will prompt must file be extracted to other filename. Then a "no"
  910.         answer skips file and "yes" prompts for new filename.
  911.  
  912.         JAR does not ask overwrite permission while extracting existing
  913.         directories unless the archive directory and existing directory
  914.         attributes do not match.
  915.  
  916.         The "-o" option can be used to specify the destination directory.
  917.  
  918.         Example: JAR16 e archive -osoft\ *.c
  919.                  Extract all files ending in ".c" to subdirectory "soft".
  920.  
  921.         If JAR encounters a CRC or Bad file data error during extraction,
  922.         JAR will delete the corrupted extracted file unless the "-jr"
  923.         option is used.
  924.  
  925.         You can extract files from a specified chapter using the "-jb"
  926.         option:
  927.  
  928.         JAR16 e archive *.txt -jb20
  929.  
  930.         Using same option you can also extract files which span a specified
  931.         chapter range.
  932.  
  933.         Example: JAR16 e archive file.txt -jb5-10
  934.                  Extracts the "file.txt" changes in chapters 5-10.
  935.  
  936.         For convenience when extracting a chapter range, JAR places files
  937.         with different starting chapters into different directories
  938.         "(5)","(6)"... (brackets enclose starting chapter number).
  939.  
  940.         NOTE: During extraction JAR DOES NOT EXTRACT DUPLICATE files into
  941.         all chapter directories from the file lifespan range. A file is
  942.         extracted ONLY into the starting chapter directory of the file.
  943.         This feature saves space and lets one easily find chapters where
  944.         the selected file has been changed.
  945.  
  946.         So "JAR16 x archive -jb5-10" will reconstruct the full chapter 5,
  947.         BUT EXTRACT ONLY THE CHANGES in chapters 6-10.
  948.  
  949.  
  950.       f: Freshen files in archive
  951.  
  952.         Update matching files in the archive that are OLDER than the
  953.         selected disk files.
  954.  
  955.         Example: JAR16 f archive *.c *.h
  956.  
  957.  
  958.       l: List contents of archive
  959.  
  960.         List contents of archive. You can get sorted output by using the
  961.         "-ju" option.
  962.  
  963.         Example: JAR16 l archive *.c *.h
  964.  
  965.         You can specify the "-n" (new) option to list the files in the
  966.         archive that DO NOT EXIST on the disk. The "-o" option may be used
  967.         to specify directory to scan.
  968.  
  969.         Example: JAR16 l -n -oc:\source archive *.c *.h
  970.  
  971.         When listing a few chapters JAR appends the corresponding file's
  972.         chapter lifespan range in the format "<from-to>".
  973.  
  974.         Example: JAR16 l archive *.c *.h -jb1-10
  975.  
  976.  
  977.       lc: List Chapters
  978.  
  979.         List chapter information: comment, creation and modification time,
  980.         and lock flag.  The command arguments are sets of chapter ranges as
  981.         in the "dc" command.
  982.  
  983.         Example: JAR16 lc archive
  984.                  List all chapter information in archive
  985.  
  986.  
  987.       ls: List contents of archive (Short form)
  988.  
  989.         List contents of archive in the shortest form.
  990.  
  991.         Example: JAR16 ls archive *.c *.h
  992.  
  993.  
  994.       lt: List Technical information for shells
  995.  
  996.         List technical information for archiver shell programs. This
  997.         command accepts a single parameter - a file that must not exist on
  998.         disk. JAR dumps the archive header information to this file.
  999.  
  1000.         Example: JAR16 lt archive header.txt
  1001.  
  1002.         See TECHNOTE.DOC for details.
  1003.  
  1004.  
  1005.       m: Move files to archive
  1006.  
  1007.         The "m" command adds the selected files to the archive. If the adds
  1008.         are successful, then the added files and directories are deleted.
  1009.         The move command does not ask permission before deleting the files.
  1010.  
  1011.         Example: JAR16 m archive soft\*.*
  1012.  
  1013.         It is STRONGLY suggested that you always use the "-jt" option with
  1014.         move commands to set JAR to verify the archive before deleting the
  1015.         input files.
  1016.  
  1017.  
  1018.       reg: register program
  1019.  
  1020.         The "reg" registration command is available only in the JAR DOS
  1021.         version.
  1022.  
  1023.         When you order JAR, you will get a registration key which matches
  1024.         the OWNER and security envelope SIGNATURE specified on the order
  1025.         form.
  1026.  
  1027.         The "reg" command simultaneously registers both JAR16.EXE and
  1028.         JAR32.EXE. Both executables must be in the same directory before
  1029.         processing. Since JAR will modify both executables, JAR16.EXE and
  1030.         JAR32.EXE must not be in use.
  1031.  
  1032.         If the "reg" command is executed without a filename argument, JAR
  1033.         will prompt for the registration key interactively.  Otherwise, JAR
  1034.         will search for the registration key within the file specified.
  1035.  
  1036.         Examples:  JAR16 reg key.txt
  1037.                    JAR16 reg
  1038.  
  1039.  
  1040.       rh: Recover archive Header
  1041.  
  1042.         This command is available only in Win32 JAR version. If your
  1043.         archive is damaged, the remaining undamaged files may be recovered
  1044.         in the following ways:
  1045.  
  1046.         - you can try to extract files using the "-hx" option. This option
  1047.           uses the recovery records (if available in archive) to repair
  1048.           slightly damaged archives.
  1049.  
  1050.         - you can try to extract files using the "-jr" option (this
  1051.           prevents JAR from aborting on damaged files). The "-hx" and "-jr"
  1052.           options can be combined.
  1053.  
  1054.         Both listed options do not help if the archive header is damaged.
  1055.  
  1056.         The "rh" command may recover useful archive data (if such) and the
  1057.         header from a seriously damaged archive. It uses signatures to
  1058.         search for valid compressed data chains. You must place all damaged
  1059.         archive volumes into same directory and then run:
  1060.  
  1061.         JAR32 rh archive
  1062.  
  1063.         JAR will output the recovered archive into the current directory as
  1064.         "$recover.j".  The archive may still contain partially damaged data
  1065.         so it may be necessary to use the "-jr" option to extract data from
  1066.         the archive.
  1067.  
  1068.         NOTE: The "rh" command recovers only the most important archive
  1069.         data: file contents, file CRC, file modification date but not time.
  1070.         The file's chapter lifespan range information is lost, too, but JAR
  1071.         tries to group different versions of the same file into different
  1072.         chapters.
  1073.  
  1074.         Be sure you specify the correct password and method for the
  1075.         protected damaged file; otherwise, JAR will report that there is no
  1076.         recoverable data.
  1077.  
  1078.         After repair of archive with multiple chapters, "$recover.j" may
  1079.         contain a smaller number of files than the original archive (even
  1080.         if it has not been damaged).  This is due to the loss of "CHAPTER
  1081.         range" information and as a result two files with the SAME DATA in
  1082.         neighboring chapters may be recovered as a single file.
  1083.  
  1084.         If you have lost one or more archive volumes, then after all
  1085.         existing volumes placed into single directory, before running "rh"
  1086.         command, you must substitute lost volumes with any other file which
  1087.         size greater than 64 bytes.  E.g., with file which contains 65
  1088.         space characters.  Obviously JAR will not find recoverable data in
  1089.         such volume substitution, however such file will allow JAR "rh"
  1090.         command to process through all volumes.
  1091.  
  1092.  
  1093.       sl: Scan Locked files
  1094.  
  1095.         After command scans selected file set it tries to open each file
  1096.         for reading. Files which JAR failed to open are listed. You can
  1097.         copy this list into file using "-l" option. Later this list file
  1098.         may be used to exclude locked files.
  1099.  
  1100.         Command does not accept archive name.
  1101.  
  1102.         Example:
  1103.  
  1104.         JAR32 sl c:\* -r -l"To be excluded"
  1105.  
  1106.         NOTE: When wildcard used with "-x" or "-x!" does not contain path
  1107.         specified (only filename) then this wildcard is used to match to
  1108.         ALL filenames (path is ignored). You must keep this in mind when
  1109.         using exclude lists generated by "sl" command. Read "-x" option for
  1110.         details.
  1111.  
  1112.  
  1113.       t: Test integrity of archive
  1114.  
  1115.         Test the contents of ALL files for the correct CRC value. JAR uses
  1116.         a 32 bit CRC to validate the contents of the files.
  1117.  
  1118.  
  1119.       test: test JAR reliability
  1120.  
  1121.         This is the command to test the reliability of JAR compressing and
  1122.         decompressing selected files. When executing this command JAR works
  1123.         in similar way like "add" command.  But after each compressed file
  1124.         portion JAR decompresses and tests files using comparison and then
  1125.         removes compressed data. This saves disk space and allows JAR to
  1126.         test gigabytes of files with limited free disk space.
  1127.  
  1128.         This command requires a temporary archive filename which will be
  1129.         used for testing.  The needed free disk space can be found from the
  1130.         following table (in megabytes):
  1131.  
  1132.         Compression method:       -m1,-m2,-m3             -m4
  1133.  
  1134.         1,000 files to test            6M                 20M
  1135.         5,000 files to test           10M                 30M
  1136.         20,000 files to test          20M                 40M
  1137.         50,000+ files                 60M                 60M
  1138.  
  1139.         This table assumes that the JAR swap file is located on the same
  1140.         drive as the temporary archive. Otherwise, use following table
  1141.         (space for temporary archive/swap file):
  1142.  
  1143.         Compression method:       -m1,-m2,-m3             -m4
  1144.  
  1145.         1,000 files to test          4M/3M               20M/5M
  1146.         5,000 files to test          4M/5M               20M/7M
  1147.         20,000 files to test         4M/10M              20M/15M
  1148.         50,000+ files                4M/30M              20M/30M
  1149.  
  1150.         Depending on the free disk space JAR will also skip files too large
  1151.         to test.  JAR must have enough space to store whole compressed file
  1152.         before testing decompression and comparing contents.
  1153.  
  1154.         When running this command JAR also uses additional methods to
  1155.         detect conflicts with hardware or software, memory or disk
  1156.         corruption. If JAR detects such problems then it will report the
  1157.         following errors:
  1158.  
  1159.           Wrong program flow detected at (<module>,<line>)
  1160.           Possibly conflict with used software or hardware
  1161.  
  1162.         or
  1163.  
  1164.           Internal at (<module>,<line>)
  1165.           Possibly conflict with hardware
  1166.  
  1167.         We strongly recommend that you run such tests before using JAR,
  1168.         especially for backup purposes. It is also useful to retest JAR
  1169.         after hardware upgrades or installation of new memory managers or
  1170.         other "critical" software.
  1171.  
  1172.         TESTJAR.BAT contains a ready-to-run command line. You can modify
  1173.         this batch file to test other compression methods (-m1,-m3, or -m4)
  1174.         or other drives.
  1175.  
  1176.         JAR16.EXE and JAR32.EXE should be tested separately in the intended
  1177.         operating environments.
  1178.  
  1179.         Example: JAR16 test archive c:\* d:\* -r -m1 -ho -jf -xwin386.swp
  1180.                  Test compression/decompression of the files on few drives.
  1181.                  "win386.swp" is excluded as it may be locked.
  1182.  
  1183.         Be sure you exclude files which may be locked for reading during
  1184.         testing; otherwise, JAR will abort on the locked file.
  1185.  
  1186.         Testing may take a long time (hours or days). You can interrupt or
  1187.         shorten any test by pressing CTL BREAK.
  1188.  
  1189.         With the "-ht0" option JAR will test the decompression using CRC32
  1190.         only instead of a file contents comparison. This may work faster.
  1191.  
  1192.         It may be useful also to test encryption/protection using "-g" and
  1193.         "-hg" options together with "test" command.
  1194.  
  1195.  
  1196.       u: Update files to archive
  1197.  
  1198.         Update older files in the archive and add files that are new to the
  1199.         archive.
  1200.  
  1201.         Example: JAR16 u software
  1202.  
  1203.  
  1204.       v: Verbosely list contents of archive
  1205.  
  1206.         This command lists the full pathname and comments of the archive
  1207.         files as well as the same information as the "l" command. It also
  1208.         shows the compression method, file access and creation time, and
  1209.         host OS. This command may be used with the "-hf" options to look at
  1210.         long filename translations.
  1211.  
  1212.  
  1213.       x: eXtract files with full pathname
  1214.  
  1215.         This command extracts one or more files from the archive to their
  1216.         full paths in the current directory or to the output directory if
  1217.         specified.
  1218.  
  1219.         Example: JAR16 x archive *.c
  1220.  
  1221.         Refer to the description of the "e" command for more information
  1222.         about extraction.
  1223.  
  1224.  
  1225.       y: copY archive with new options
  1226.  
  1227.         The JAR "y" command provides an easy interface to the options that
  1228.         change archive settings.
  1229.  
  1230.         Examples: JAR16 y archive -jl            locks archive
  1231.                   JAR16 y archive -g? -jg?       changes archive password
  1232.                   JAR16 y archive -hk            adds recovery records to
  1233.                                                    archive
  1234.                   JAR16 y archive -hk-           removes recovery records
  1235.                   JAR16 y archive -v20k -osplit  splits archive into 20K
  1236.                                                    volumes
  1237.                   JAR16 y split -oarchive        concatenates archive
  1238.                                                    volumes back
  1239.                   JAR16 y archive -hx            repairs damaged archive
  1240.                                                    using recovery records
  1241.  
  1242.         NOTE: When changing the password JAR always tests the archive.
  1243.  
  1244.  
  1245.     JAR SWITCH OPTIONS:
  1246.  
  1247.  
  1248.       b0: reset archive bits
  1249.  
  1250.         The "-b0" switch does NOT affect file selection. It causes JAR to
  1251.         reset the archive bits of added files. If the "f", "u", or "ac"
  1252.         command has been selected, JAR will also reset the archive bits of
  1253.         files that are already duplicated in the archive.
  1254.  
  1255.         Example: JAR16 a e:archive c:\*.* -b0 -r
  1256.                  archives all files on the C drive and resets all archive
  1257.                  bits.
  1258.  
  1259.         This option also causes JAR to reset the archive bit of extracted
  1260.         files.
  1261.  
  1262.         NOTE: JAR ignores archive bit set/reset errors. If error occurs
  1263.         then added file archive bit value is not changed. For extracted
  1264.         file archive bit remains set to 1.
  1265.  
  1266.  
  1267.       b1: set archive bits
  1268.  
  1269.         Works like "-b0" but sets the archive bit instead.
  1270.  
  1271.  
  1272.       d: with Delete (move)
  1273.  
  1274.         This switch with the "a" command is similar to the standard MOVE
  1275.         command. Successfully added files will be deleted. When used with
  1276.         the "f", "u", or "ac" command, JAR will also delete files that are
  1277.         already duplicated in the archive. JAR will prompt the user before
  1278.         deleting the files unless the "-y" or "-jyd" switch is specified.
  1279.         Also, you can use the "m" command which does not prompt before
  1280.         deleting the files.
  1281.  
  1282.         Example: JAR16 a archive filename -d -y       is equivalent to
  1283.                  JAR16 m archive filename
  1284.  
  1285.         This option works with "add" type commands only.
  1286.  
  1287.  
  1288.       f: Freshen existing files
  1289.  
  1290.         This switch works only with the "e" and "x" commands.
  1291.  
  1292.         "-f" specifies JAR to extract newer files from the archive.
  1293.  
  1294.         "-f1" specifies to extract older files.
  1295.  
  1296.         "-f2" specifies to files with a changed date/time or size.
  1297.  
  1298.         NOTE: JAR ignores date/time comparison between directories (always
  1299.         assumed are the same).
  1300.  
  1301.         Example: JAR16 x archive -osource -f
  1302.                  Extract newer files
  1303.  
  1304.  
  1305.       g: specify archive password
  1306.  
  1307.         This switch will specify the archive password. An archive can be
  1308.         protected from unauthorized access by using a password with either
  1309.         of two different protection methods.
  1310.  
  1311.         The protection method may be specified using the "-hg" option. The
  1312.         "Authenticate" method establishes an archive password WITHOUT the
  1313.         actual encryption of its contents. The "GOST v1.01" method uses
  1314.         GOST 28147-89 encryption in CBC mode to encrypt archive files (but
  1315.         NOT archive header which contains comments and filenames).
  1316.  
  1317.         With the default configuration file and without specifying the
  1318.         protection method ("-hg") JAR uses the "Authenticate" method. The
  1319.         "DefaultAccessProtection" setting in the CFG file allows one to
  1320.         change this behavior.
  1321.  
  1322.         NOTE: Encryption is not available in the export JAR version.
  1323.  
  1324.         Once an archive is protected, JAR requires the password when
  1325.         extracting or updating the archive.
  1326.  
  1327.         JAR stores within the archive header a secure password hash. This
  1328.         allows verification of the specified password before the actual
  1329.         update/extract operation. But there is a very small (smaller than
  1330.         1e-30) probability that the hash function will not detect an
  1331.         incorrect password during an update operation. In this case,
  1332.         different files may be encrypted using different passwords. So JAR
  1333.         may report "CRC error" or "Bad data" when using the wrong password
  1334.         for update.
  1335.  
  1336.         Short and trivial passwords allow brute-force attacks against
  1337.         protected archive. We recommend to use passwords longer than 16
  1338.         characters. Special characters and digits in password also
  1339.         recommended.
  1340.  
  1341.         Example: JAR16 e archive -gpassword
  1342.  
  1343.         If the "-g" option is followed by a question mark "?", JAR will
  1344.         prompt the user for the password without displaying the password.
  1345.         The backspace key can be used to erase characters.
  1346.  
  1347.         Example: JAR16 a archive -g?
  1348.  
  1349.         Use the "y" command with "-jg" option to remove/set password for an
  1350.         already existing JAR archive.
  1351.  
  1352.         Please save your password in a safe place. There is no trick,
  1353.         trapdoor, or shortcut to recovering a lost password.
  1354.  
  1355.         NOTE: The first JAR 1.01 BETA used the now obsolete
  1356.         "Authentication" method to protect an archive.  Please read
  1357.         WHATSNEW.DOC for details.
  1358.  
  1359.  
  1360.       h: selects (second) alternate set of switch characters.
  1361.  
  1362.         Works like the "-j" shift option but selects another set of switch
  1363.         characters. See the "-j" switch for more details.
  1364.  
  1365.  
  1366.       j: selects alternate set of switch characters.
  1367.  
  1368.         This switch toggles the set of switch characters. The toggle is
  1369.         reset at end at of each separate switch sequence back to the main
  1370.         set of switch characters.
  1371.  
  1372.         For example, "-jf" is not the same function as "-f".  However,
  1373.         "-jjf" is the same as "-f" because of the double toggle.  Also,
  1374.         "-jljf" is NOT the same as "-jl -jf".  The switch sequence "-jlf"
  1375.         is the same as "-jl -jf". It is not recommended that you use these
  1376.         combined shift sequences.
  1377.  
  1378.  
  1379.       l: create List_name file
  1380.  
  1381.         This switch will set JAR to dump to the filename specified after
  1382.         the "-l" switch all of the filenames to be processed by this JAR
  1383.         command.
  1384.  
  1385.         For add type commands, this list contains all files that matched
  1386.         the file wildnames given on the command line.
  1387.  
  1388.         For "sl" command, this list contains files which JAR failed to open
  1389.         for reading.
  1390.  
  1391.         For other commands, the file will contain only the original
  1392.         filenames and/or wildcard names. Other options do NOT affect the
  1393.         output of filenames to this list file.
  1394.  
  1395.         This list file can be used as a listfile on the command line.
  1396.  
  1397.         Example: JAR16 a -lname.lst archive *.exe
  1398.                  This example will create a file named "name.lst" with all
  1399.                  scanned *.exe files.
  1400.  
  1401.  
  1402.       m: with Method 1, 2, 3, 4
  1403.  
  1404.         Method 1 = fastest compression. This method uses a small fixed
  1405.         memory amount for compression in comparison with -m2..4 .
  1406.  
  1407.         Method 2 = normal compression (default). JAR uses available memory
  1408.         to improve compression.
  1409.  
  1410.         Method 3 = better compression. This method works slower but may
  1411.         improve compression a few percent.
  1412.  
  1413.         Method 4 = best compression. This method may compress better with
  1414.         large amounts of data (>2 Mbytes). "-m4" is not recommended for
  1415.         archives that may be modified in future. JAR requires up to 12
  1416.         Mbytes of additional disk space for a swap file when updating these
  1417.         archives. In addition, updates are much slower compared to the
  1418.         other methods.
  1419.  
  1420.         Examples:  JAR16 a archive *.exe -m3
  1421.                    Better compression
  1422.  
  1423.                    JAR16 a archive *.exe -m4
  1424.                    Uses the best compression
  1425.  
  1426.         Recommended values of free memory for decompression depend on the
  1427.         method used:
  1428.  
  1429.         "-m1"              - does not require additional memory
  1430.         "-m2" and "-m3"    - 1.5 Mbytes
  1431.         "-m4"              - 3.0 Mbytes
  1432.  
  1433.         These values are RECOMMENDED for optimal operation; however, JAR
  1434.         will decompress files with less memory.
  1435.  
  1436.         Usually methods "-m3" and "-m4" work 1.5 times slower than default
  1437.         "-m2".
  1438.  
  1439.         What is difference between these methods? JAR uses a greatly
  1440.         improved LZ family algorithm.  "-m1"  matches strings at
  1441.         short distances (comparable with PKZIP - about 32Kbytes). "-m2"
  1442.         searches for strings at large distances (about 500K-1000Kbytes and
  1443.         sometimes more) depending on the memory amount used. "-m3" method
  1444.         works like "-m2" but does a more exhaustive slower search. "-m4"
  1445.         matches strings at even larger distances and like "-m3" uses an
  1446.         exhaustive search.
  1447.  
  1448.         The second difference between methods is data block size. For "-m1",
  1449.         "-m2", "-m3", JAR concatenates files into 1000K-1500Kbytes pieces
  1450.         to obtain good compression and reasonable update speed.  This also
  1451.         makes a JAR archive more robust than a "FULLY" solid archive (a
  1452.         damaged byte affects at most a single block, not the whole
  1453.         archive).  The only drawback is a slight lose in compression rate.
  1454.  
  1455.         "-m4" compresses better by concatenating files into significantly
  1456.         larger blocks - up to 12Mbytes.
  1457.  
  1458.         Therefore, we recommend the use of "-m2" for archives which may be
  1459.         updated frequently and "-m4" for the "best and solid" compression.
  1460.  
  1461.  
  1462.       n: only New files (not exist)
  1463.  
  1464.         With the "a" command, add files that do not exist in the target
  1465.         archive.
  1466.  
  1467.         With the "d" command, delete files that do not exist in the target
  1468.         directory.  With the list type command, list files that do not
  1469.         exist.  Target directory may be specified using "-o" option.
  1470.  
  1471.  
  1472.       o: Output directory/file
  1473.  
  1474.         For commands which scan files this option specifies the destination
  1475.         directory within the archive for scanned files.
  1476.  
  1477.         Example: JAR16 a archive dir1\a.txt -oversion1 -jf-
  1478.                  File will be added to archive as "version1\dir1\a.txt"
  1479.  
  1480.         For extraction commands this option specifies the destination
  1481.         directory where files are to be extracted.
  1482.  
  1483.         Example: JAR16 e archive dir1\a.txt -oc:\version1 -jf-
  1484.                  File will be extracted to "c:\version1\a.txt"
  1485.  
  1486.         For the "y" command, this option specifies the updated archive
  1487.         name. Currently, the "y" command together with "-o" option is the
  1488.         only way to update a multi-volume JAR archive.
  1489.  
  1490.         Examples: JAR16 y archive -oa:archive
  1491.                   Copies archive to floppy
  1492.  
  1493.                   JAR16 y archive -oa:archive -va
  1494.                   Copies archive to multiple floppies and automatically
  1495.                   splits to volumes
  1496.  
  1497.         See the "y" command description for more details.
  1498.  
  1499.         For the "d", "l", "v", "ls" commands with the "-n" (new files)
  1500.         option, the "-o" option specifies the directory to scan.
  1501.  
  1502.  
  1503.       q: Query on each file
  1504.  
  1505.         This switch causes JAR to prompt the user prior to acting upon each
  1506.         archived file for all but the "l", "lc", "ls", "lt", "rh", "t", "v"
  1507.         and "y" commands. This allows you to selectively extract, delete,
  1508.         add, etc.
  1509.  
  1510.  
  1511.       r: Recurse subdirectories
  1512.  
  1513.         This switch will set JAR to recurse any wildcards specified on the
  1514.         command line by traversing all subdirectories scanning for matches.
  1515.  
  1516.         JAR will also recurse non-wildcard filenames as in:
  1517.         JAR16 a archive FILE.BBS -r
  1518.  
  1519.         By default this option is ON for all commands that matches files
  1520.         within archive ("c", "d", "e", "da", "l", "ls", "v", "x"). By
  1521.         default this option is toggled OFF for all commands that scan files
  1522.         ("a", "ac", "f", "m", "u", "test").
  1523.  
  1524.         Examples: JAR16 l archive -r- *.doc
  1525.                   List *.doc files only in root archive directory.
  1526.  
  1527.                   JAR16 d archive *.doc
  1528.                   Delete ALL *.doc files from archive
  1529.  
  1530.                   JAR16 d archive test\*.doc -r-
  1531.                   Delete *.doc files from test\ directory, but not
  1532.                   subdirectories
  1533.  
  1534.  
  1535.       s: set archive time-Stamp
  1536.  
  1537.         This switch causes JAR to set the date-time stamp of the archive to
  1538.         that of the newest file in the archive. This option works only with
  1539.         update operations.
  1540.  
  1541.         The "-s1" switch is used to keep the old archive date-time stamp.
  1542.         The new archive will have the same date-time stamp as the original
  1543.         archive.
  1544.  
  1545.  
  1546.       u: Update files
  1547.  
  1548.         This switch works only with the "e" and "x" commands.
  1549.  
  1550.         "-u" specifies JAR to extract only newer and non-existing files
  1551.         from the archive.
  1552.  
  1553.         "-u1" specifies to extract only older and non-existing files.
  1554.  
  1555.         "-u2" specifies to extract non-existing files and files that
  1556.         date/time or size changed.
  1557.  
  1558.         NOTE: JAR ignores date/time comparison between directories (always
  1559.         assumed are the same).
  1560.  
  1561.         Example: JAR16 x archive -osource -u2
  1562.                  Extracts new or changed files
  1563.  
  1564.  
  1565.       v: enable multiple Volumes
  1566.  
  1567.         While creating a NEW archive this option specifies the new archive
  1568.         volume size. This option cannot be used while updating an existing
  1569.         archive. The only exception is the "y" command with the "-o"
  1570.         option. As such, the "y" command allows one to split an archive, to
  1571.         change the existing archive volume size, or to concatenate all the
  1572.         volumes into one volume.
  1573.  
  1574.         The "-v" option is unnecessary for non-update operations since the
  1575.         JAR archive header contains information about each volume created
  1576.         and its size. JAR will report an error when "-v" is used together
  1577.         with unsupported command.
  1578.  
  1579.         Thus while extracting a single file JAR will only prompt for the
  1580.         required volume(s). To list the archive contents JAR usually
  1581.         requires only the last volume (".j" default extension). In rare
  1582.         cases, a few last volumes are required as the archive header may
  1583.         not fit the last volume.
  1584.  
  1585.         JAR volumes are suffixed in following order: .j01, .j02, ... .j99,
  1586.         .100, .101 ... .990. The LAST VOLUME by default is suffixed .j and
  1587.         it must be used in the command line for future access to the
  1588.         archive. JAR supports up to 990 volumes.
  1589.  
  1590.         When creating new volumes on a removable drive JAR pauses and
  1591.         checks that the diskette has been really changed. However, this
  1592.         check is limited to 3 retries for the same volume. This test can be
  1593.         inhibited with the "i" modifier. JAR does not do this check when
  1594.         accessing volumes for reading or testing.
  1595.  
  1596.         Example: JAR16 a a:archive -vi -va
  1597.  
  1598.         The "-v" switch will accept the abbreviations 360, 720, 1200, and
  1599.         1440. These will be translated to 362,000, 730,000, 1,213,000, and
  1600.         1,457,000 bytes, respectively. Please note that if the available
  1601.         disk space is less than the requested amount, JAR will prompt the
  1602.         user for permission to continue. You can use the "K" modifier as a
  1603.         shortcut for "000". For example, 100K means 100000. "K" does NOT
  1604.         mean 1024.
  1605.  
  1606.         The "-va" switch sets the disk space auto-detect option. JAR will
  1607.         check for the disk space available on the target drive and try to
  1608.         use all or most of it. This option is aimed at diskette usage.
  1609.         Please note that this switch option detects free disk space. It
  1610.         does NOT detect formatted disk space. If the space available is
  1611.         less than 10,000 bytes, JAR will prompt the user for permission to
  1612.         continue.
  1613.  
  1614.         Examples: JAR16 a a:backup -va
  1615.                   JAR16 a backup -v360
  1616.  
  1617.         The "v" modifier turns on the next volume beep option. When you
  1618.         select this option, JAR will sound a beep prior to the next volume.
  1619.  
  1620.         The "r" modifier allows the reservation of disk space on the first
  1621.         volume. The number after the "r" specifies the space to reserve.
  1622.  
  1623.         Example: JAR16 a install -v360r50K
  1624.                  Make first volume 50000 bytes smaller than 360K.
  1625.  
  1626.         The switch modifier "s" can be used to make JAR execute one
  1627.         specified system command prior creation of new volume or make JAR
  1628.         pause for manual execution of system commands. This is useful for
  1629.         purging target diskettes before JAR writes to them.
  1630.  
  1631.         The switch modifier "z" is identical to the "s" modifier except
  1632.         that the system command is not echoed to the screen.
  1633.  
  1634.         Optionally, after the "s" modifier, you can specify a system
  1635.         command or batch filename. JAR will automatically execute the
  1636.         command or batch file before creating each new volume. If the
  1637.         command has embedded blanks, then the switch option must be
  1638.         surrounded by double quotes. The system command is executed before
  1639.         JAR executes the auto-detect space option.
  1640.  
  1641.         Examples: JAR16 a A:backup -vas
  1642.                   JAR16 a A:backup -vvas
  1643.                   JAR16 a A:backup -v360s
  1644.                   JAR16 a A:backup -vv360s
  1645.                   JAR16 a A:backup -vaspurge.bat
  1646.                   JAR16 a A:backup -v360sdelete.bat
  1647.                   JAR16 a A:backup -vas"FORMAT A:"
  1648.                   JAR16 a A:backup -vas"DIR C:\"
  1649.  
  1650.         The "-v" switch accepts its modifiers in any order. The "s" and "z"
  1651.         modifiers must be last because any succeeding text is considered
  1652.         the system command to execute.
  1653.  
  1654.         You can suppress the next volume prompt with the "-y" or the "jyv"
  1655.         option. However, when using the "-y" option with multiple volume
  1656.         JAR archives on removable media drives, JAR will ALWAYS PROMPT for
  1657.         the next diskette. The "-jyv" option WILL ALWAYS suppress the
  1658.         prompt even for removable media.
  1659.  
  1660.         During JAR operation in non-update commands, JAR will not abort
  1661.         when it cannot open the correct sequential JAR volume archive. It
  1662.         will report the open error and proceed to the prompt. At this point
  1663.         it is possible to swap diskettes to put the correct volume in
  1664.         place. This feature is disabled if the "next volume" prompt has
  1665.         been disabled.
  1666.  
  1667.  
  1668.       w: assign Work directory
  1669.  
  1670.         This switch option is HIGHLY recommended if you are archiving
  1671.         directly to diskettes.
  1672.  
  1673.         By default, JAR builds a new JAR archive file in the same directory
  1674.         as the old archive file. By specifying the "-w" switch, you can
  1675.         specify the working directory where the temporary archive file will
  1676.         be built. After the temporary archive file is built, it is copied
  1677.         over the original archive and deleted.
  1678.  
  1679.         Normally JAR requires enough disk space for the original archive
  1680.         and the new temporary archive. Specifying the "-w" switch allows
  1681.         you to move some of that disk space requirement to another
  1682.         directory.
  1683.  
  1684.         When using the "-w" switch while archiving to multiple volumes, JAR
  1685.         will check the available disk space in the work directory. If there
  1686.         is not enough space, JAR will prompt for permission to continue.
  1687.         This prompt can be suppressed with the "-y" and "-jyk" switches.
  1688.  
  1689.         If the copy of the temporary archive on top of the original archive
  1690.         aborts, you must do the copy manually. JAR will not delete the
  1691.         temporary archive in this error situation.
  1692.  
  1693.         Example: JAR16 a -we:\temp\ archive *.c
  1694.  
  1695.         For speed reasons, you should always use the "-w" option when
  1696.         creating or modifying archives on diskettes. You should specify a
  1697.         work directory on your hard disk or a sufficiently sized RAMDISK.
  1698.  
  1699.         Example: JAR16 a -we:\ b:archive *.c
  1700.  
  1701.  
  1702.       x: Exclude filenames
  1703.  
  1704.         This switch is used to exclude filenames or wildnames from the list
  1705.         of filenames to be processed.
  1706.  
  1707.         Example: JAR16 a archive soft\* -r -x*.exe -x*.obj -xtest
  1708.  
  1709.         This example will archive all files in the "soft" directory and
  1710.         subdirectories except for any files named "test" or ending in
  1711.         ".exe" and ".obj".
  1712.  
  1713.         You can also specify an exclude file list by preceding the filename
  1714.         with the list character "!". The exclude file list must contain a
  1715.         list of filenames/wildnames specified one per line.
  1716.  
  1717.         Example: JAR16 a archive soft\* -r -x!exclude.lst
  1718.  
  1719.         You can specify a pathname to exclude as in:
  1720.  
  1721.         JAR16 a archive \dir\*.* -r -x\dir\*.*
  1722.  
  1723.         In the above example, JAR will exclude all files in \dir but not
  1724.         the subdirectories in \dir.
  1725.  
  1726.         The "-x" option also allows you to exclude an entire path including
  1727.         subdirectories from being selected for processing.
  1728.  
  1729.         Syntax: JAR16 a archive C:\*.* -xC:\TEMP\
  1730.  
  1731.         The "\" after C:\TEMP indicates to JAR that everything below
  1732.         C:\TEMP\ is to be excluded.
  1733.  
  1734.         Note that the exclude directory option requires that the directory
  1735.         be specified in the same relative path that the selected files use.
  1736.  
  1737.         Example:
  1738.         JAR16 a archive \temp\*.* -x\temp\firstdir    is correct usage
  1739.         JAR16 a archive \temp\*.* -xC:\temp\firstdir  is NOT correct because
  1740.                                                       of the C:
  1741.  
  1742.         The "-x" switch also works for non-update commands like "e" and
  1743.         "l".
  1744.  
  1745.         Examples: JAR16 e archive -x*.exe
  1746.                   Extract all files except *.exe files
  1747.  
  1748.                   JAR16 l archive -x*.exe -x*.obj
  1749.                   List all files except *.exe and *.obj
  1750.  
  1751.                   JAR16 e archive \ -xdir\*.c
  1752.                   Extract all files except *.c in directory "dir"
  1753.  
  1754.         The "-x" switch with "lc" and "dc" allows the exclusion of chapter
  1755.         ranges:
  1756.  
  1757.         JAR16 lc archive -x1-50
  1758.         List all chapters except first 50.
  1759.  
  1760.  
  1761.       y: assume Yes on all queries
  1762.  
  1763.         Use this switch for batch type uses of JAR. This switch disables
  1764.         most of the normal user queries during JAR execution. Use this
  1765.         switch to suppress overwrite queries in the "e" and "x" commands,
  1766.         to suppress the make new directory query in the "e" and "x"
  1767.         commands, to suppress the new filename prompt when an open file
  1768.         operation fails in the "e" and "x" commands and to suppress the
  1769.         next volume pause using the "-v" option to create volumes on the
  1770.         hard disk.
  1771.  
  1772.         The "-y" switch will NOT suppress the "-v" next volume prompt when
  1773.         the archive is located on a drive with removable media such as a
  1774.         diskette drive.
  1775.  
  1776.         Use this option with due caution, especially during extraction as
  1777.         this sets JAR to overwrite files. NOTE: JAR does not overwrite
  1778.         readonly files unless the "-ha" option is used.
  1779.  
  1780.         As an alternative, you can use the "-jy" option that lets you
  1781.         suppress individual types of user queries.
  1782.  
  1783.  
  1784.       z: supply file for archive comment
  1785.  
  1786.         The "-z" switch has been provided to facilitate batch commenting of
  1787.         JAR archives with the "c" command. When the "-z" option has been
  1788.         specified with or without a comment file, JAR will only process the
  1789.         archive header comment.
  1790.  
  1791.         A comment file containing only a single blank can be used to erase
  1792.         comments from JAR archives.
  1793.  
  1794.         Syntax: JAR16 c archive -z
  1795.                 JAR16 c archive -zcomment.txt
  1796.                 JAR16 a archive -zcomment.txt
  1797.  
  1798.         Another method to erase the comment is to specify the predefined
  1799.         "NUL" filename:
  1800.  
  1801.                 JAR16 c all -zNUL
  1802.  
  1803.         The "-z" option also allows one to dump the JAR archive header
  1804.         comment to a file. This will extract only the main archive comment
  1805.         and not the individual file comments.
  1806.  
  1807.         Syntax: JAR16 e archive "" -zcomment.txt    dumps only the comment
  1808.                 JAR16 x archive -zcomment.txt       dumps comment and files
  1809.  
  1810.  
  1811.       jb: select chapter or chapter range
  1812.  
  1813.         Syntax: -jb10        Selects chapter 10
  1814.                  -jb10-      Selects all chapters from 10 and above
  1815.                  -jb-10      Selects chapters from 1 to 10
  1816.                  -jb10-20    Selects chapters from 10 to 20
  1817.                  -jb1-       Selects all chapters
  1818.                  -jb"-"      Also selects all chapters
  1819.  
  1820.         For listing commands ("v", "l", "ls"), this option specifies the
  1821.         file chapter range to list.
  1822.  
  1823.         Examples: JAR16 l archive -jb10
  1824.                   Lists chapter 10
  1825.  
  1826.                   JAR16 l archive -jb1-
  1827.                   Lists all files in all chapters
  1828.  
  1829.                   JAR16 l archive
  1830.                   Lists LAST chapter
  1831.  
  1832.         For the comment command ("c"), this option specifies the range
  1833.         of chapters to comment or files in the chapter range to comment.
  1834.  
  1835.         Examples: JAR16 c archive -hz -jb1-10
  1836.                   Comment a few chapters
  1837.  
  1838.                   JAR16 c archive -jb1-10
  1839.                   Comments all files in chapters from 1 to 10
  1840.  
  1841.                   JAR16 c archive -hz"Ansi comment".txt
  1842.                   Comments last chapter from archive
  1843.  
  1844.         Commenting will fail if the affected chapter is locked.
  1845.  
  1846.         For extract commands ("e", "x"), this option specifies the chapter
  1847.         to extract.
  1848.  
  1849.         Examples: JAR16 x archive -jb5 -oc:\dest
  1850.                   Extracts whole chapter 5 into "c:\dest"
  1851.  
  1852.                   JAR16 x archive *.c
  1853.                   Extracts selected files from LAST chapter
  1854.  
  1855.         JAR can also extract one chapter and subsequent changes to it in
  1856.         selected chapter range.
  1857.  
  1858.         Example: JAR16 x archive -jb5-10 text.txt
  1859.                  Will extract the full chapter 5 and ONLY the changed
  1860.                  "text.txt" versions in chapters from 6 to 10. JAR uses the
  1861.                  corresponding chapter number in destination path in the
  1862.                  form "(5)","(6)"...
  1863.  
  1864.         See also the "e" command for more details.
  1865.  
  1866.         If selected operation affects few chapters at once then JAR shows
  1867.         each file lifespan range in the format "<from-to>".
  1868.  
  1869.         The switch "-jb" can not be used with other commands.
  1870.  
  1871.         With update commands "a", "f", "m", "u", "d" you can access only
  1872.         the LAST chapter. You can delete from a few chapters at once using
  1873.         "da" or "dc" commands.
  1874.  
  1875.  
  1876.       jf: store Full matched path
  1877.  
  1878.         JAR uses two methods to store the scanned file path within an
  1879.         archive. If the "-jf" option is ON then the full scanned file path
  1880.         is stored. Only the drive letter and root slash is removed.
  1881.  
  1882.         If the "-jf" option is OFF then the RELATIVE scanned file path with
  1883.         respect to the wildcard is stored.
  1884.  
  1885.         Examples:
  1886.         JAR16 a all c:\dir1\dir2\a.txt -jf
  1887.         file will be stored within archive as "dir1\dir2\a.txt"
  1888.  
  1889.         JAR16 a all c:\dir1\dir2\a.txt -jf-
  1890.         file will be stored within archive as "a.txt"
  1891.  
  1892.         JAR does not support storing an archive path which contains ".\"
  1893.         and "..\".  Only the path back to the ".\" or "..\" is stored (-jf
  1894.         is ON).
  1895.  
  1896.         Examples:
  1897.         JAR16 a all c:\dir1\..\dir2\a.txt -jf
  1898.         file will be stored within archive as "dir2\a.txt"
  1899.  
  1900.         JAR16 a all c:\dir1\..\dir2\a.txt -jf-
  1901.         file will be stored within archive as "a.txt"
  1902.  
  1903.         This option affects only the commands that scan files ("a", "ac",
  1904.         "u", "f", "m"). The default value for the "-jf" option may be
  1905.         changed within the configuration file. See the "FullPath" keyword
  1906.         for additional information.
  1907.  
  1908.  
  1909.       jg: specify new password
  1910.  
  1911.         This option with the "y" command can be used to remove or set or
  1912.         change the archive password.
  1913.  
  1914.         JAR16 y archive -goldpassword -jgnewpassword
  1915.         Changes archive password
  1916.  
  1917.         JAR16 y archive -gpassword -jg
  1918.         Removes archive password
  1919.  
  1920.         JAR16 y archive -jgpassword -hg1
  1921.         Sets archive password (GOST encryption method)
  1922.  
  1923.         With "-jg?" JAR will prompt for new password.
  1924.  
  1925.         Example: JAR32 y archive -jg? -v20k -o"Split and garbled"
  1926.                  splits and garbles archive into new "Split and garbled.j"
  1927.                  archive
  1928.  
  1929.         NOTE: After the password is changed JAR always tests the temporary
  1930.         archive before overwriting the original archive.
  1931.  
  1932.  
  1933.       jl: Lock archive
  1934.  
  1935.         This option sets a global archive flag for update operations. An
  1936.         archive with this flag set does not allow any archive
  1937.         modifications. There is no way to clear this "Lock" flag. You can
  1938.         only decompress or list files from a locked archive.
  1939.  
  1940.         Example: JAR16 y archive -jl
  1941.                  Lock existing archive
  1942.  
  1943.  
  1944.       jl1: Lock existing chapters
  1945.  
  1946.         This option locks all existing chapters. Any update operation that
  1947.         attempts to modify locked chapters, files in locked chapters, or
  1948.         their comments will fail. There is no way to "unlock" the chapter.
  1949.         You can only decompress and list this chapter.
  1950.  
  1951.         Unlike the "-jl" option, new chapters may be added to the archive
  1952.         and they will not be locked.
  1953.  
  1954.         Example: JAR16 ac archive c:\* -jl1
  1955.                  Add new chapter and lock all chapters
  1956.  
  1957.  
  1958.       jl2: make auto-Lockable archive
  1959.  
  1960.         This option sets the global archive flag "auto-lock".  Now after
  1961.         each "ac" command, JAR immediately locks the newly created chapter.
  1962.         So you can only list files, extract files or add new chapters. No
  1963.         other modifications are allowed.
  1964.  
  1965.         Example: JAR16 y archive -jl2
  1966.                  Makes existing archive "auto-lockable"
  1967.  
  1968.         There is no way to clear "auto-lock" flag.
  1969.  
  1970.  
  1971.       jr: Recover broken archive files
  1972.  
  1973.         This option is available only in the Win32 JAR version.
  1974.  
  1975.         This switch is used to access files in an archive corrupted either
  1976.         with bad data or missing data. JAR will continue processing despite
  1977.         these errors.
  1978.  
  1979.         NOTE: JAR does not scan the whole archive during extraction as it
  1980.         knows the exact location of each compressed file. So JAR can "skip
  1981.         around" the damaged files if you exclude them from the requested
  1982.         files set.
  1983.  
  1984.         This switch also will allow the extraction of files with CRC or Bad
  1985.         file data errors. Normally, JAR will delete these extracted files.
  1986.  
  1987.         Example:  JAR32 e archive -jr
  1988.  
  1989.         With this option JAR will NOT check that the supplied volume is
  1990.         correct.  Substituting another volume is one possible workaround in
  1991.         the case of a lost volume.
  1992.  
  1993.  
  1994.       js: Select chapter creation mode
  1995.  
  1996.         Each file in archive has a chapter lifespan range. When a file is
  1997.         backed up using the "ac" command and has not changed since the last
  1998.         chapter in archive, only the lifespan range is changed. A copy of
  1999.         the file is NOT added to the archive since a copy already exists in
  2000.         the archive. If the backed up file is different from the previous
  2001.         version, then that file is added to the archive with an appropriate
  2002.         chapter range.
  2003.  
  2004.         The "-js" option selects method used to detect changed (different)
  2005.         files.
  2006.  
  2007.         If "-js0" is set, then JAR considers a file different if its size
  2008.         or modification date/time or creation date/time do not equal the
  2009.         corresponding values of the file stored within the archive in the
  2010.         last chapter.
  2011.  
  2012.         If "-js1" is specified JAR works like "-js0" but IGNORES a changed
  2013.         creation time. So the file may have different creation date/time
  2014.         but still will be considered as the same as the file in archive.
  2015.         This option is useful when working with DOS tools. DOS programs do
  2016.         not know about file creation time and so do not store/restore it
  2017.         properly (e.g., DOS archivers). JAR for DOS assumes the scanned
  2018.         file creation time is equal to the file modification time.  So the
  2019.         "-js1" option is also useful when adding new chapters into the same
  2020.         archive with both JAR for Win32 and JAR for DOS.
  2021.  
  2022.         The "-js1" option is default.
  2023.  
  2024.         With "-js0" or "-js1" JAR does NOT consider a file different if the
  2025.         file attributes (read only/system/hidden/archive) are the only file
  2026.         properties changed.
  2027.  
  2028.         With "-js0" or "-js1" JAR NEVER adds copy of a directory. Instead,
  2029.         JAR modifies the directory's chapter lifespan range.
  2030.  
  2031.         You can also specify the "-js-" option.  Then JAR will assume ALL
  2032.         files and directories are different in comparison with the last
  2033.         archive chapter. This causes JAR to work slower as ALL files must
  2034.         be compressed again.
  2035.  
  2036.         NOTE: JAR uses a special compression method that compresses only
  2037.         the difference between different file versions in subsequent
  2038.         chapters. This produces a major compression improvement for a
  2039.         multiple-chapter archive. Currently JAR does not use this
  2040.         compression method if the file size is more than about 500 Kbytes.
  2041.  
  2042.         The "-js" options may be used only with the "ac" command.  During
  2043.         this command JAR reports all unchanged files as "marked". This
  2044.         message may be turned off using a configuration file setting. See
  2045.         the "HideMarkedFiles" keyword.
  2046.  
  2047.         See the "ac" command for other details.
  2048.  
  2049.  
  2050.       jt: Test temporary archive
  2051.  
  2052.         The "-jt" switch can be used to set JAR to execute an archive
  2053.         integrity check on an intermediate temporary archive before
  2054.         overwriting any pre-existing original archive. If any error occurs,
  2055.         JAR will not overwrite the original archive.
  2056.  
  2057.         With the "-w" option JAR also will verify that the temporary
  2058.         archive is successfully copied.
  2059.  
  2060.         Example:  JAR16 m archive *.c -jt
  2061.  
  2062.  
  2063.       ju0: sort files by name during listing
  2064.  
  2065.         This option sorts files with the "l", "ls" and "v" commands. This
  2066.         option is set by default. To prevent JAR from sorting, use the
  2067.         "-ju-" option. This causes JAR to work a bit faster.
  2068.  
  2069.         Example: JAR16 ls archive -ju0
  2070.  
  2071.  
  2072.       ju1: sort files by extension during listing
  2073.  
  2074.         This is like "-ju0" but it first sorts files by extension, then by
  2075.         name.
  2076.  
  2077.         Example: JAR16 ls archive -ju1
  2078.  
  2079.  
  2080.       jx: hide archive contents
  2081.  
  2082.         Together with any update command this option sets the "HIDDEN"
  2083.         archive flag. When this flag is ON, JAR asks for the archive access
  2084.         password for ALL operations.
  2085.  
  2086.         By default (HIDDEN flag is OFF) JAR asks for the archive password
  2087.         only when it is necessary. This means that the password is NOT
  2088.         asked for when using list commands and some "y" and "c" commands.
  2089.         The "-jx" option specifies JAR to ask for the password before any
  2090.         operation with the archive.
  2091.  
  2092.         The option is ignored for archives that are not protected/encrypted.
  2093.  
  2094.         NOTE: This option only enables an internal JAR check, it does NOT
  2095.               encrypt the JAR archive header. If you need a more secure
  2096.               method for hiding archive header information then you need to
  2097.               compress and encrypt this archive into another archive.
  2098.  
  2099.         NOTE: Encryption is not available in export JAR version.
  2100.  
  2101.         Example: JAR16 y archive -jx
  2102.                  If "archive.j" is protected then this command "hides" archive
  2103.                  contents
  2104.                  JAR16 y archive -gpassword -jx-
  2105.                  Now archive contents can be listed without specifying
  2106.                  password
  2107.  
  2108.  
  2109.       jy: suppress queries assuming Yes
  2110.  
  2111.         This switch is used to suppress individual JAR user prompts.
  2112.  
  2113.         Syntax: JAR16 e archive -jy<flags>
  2114.  
  2115.         where <flags> is one or more of the following characters: c, d, k,
  2116.         n, o, t, v. For each flag selected, JAR will act as if you had
  2117.         answered YES to the suppressed question.
  2118.  
  2119.         C - skip create directory query
  2120.         D - skip delete files query
  2121.         K - skip disk space availability query
  2122.         N - skip new filename prompt
  2123.         O - skip overwriting existing file query
  2124.         T - skip overwriting directory attributes query
  2125.         V - skip ok to proceed to next volume query
  2126.  
  2127.         Example:  JAR16 x volume -v -jyco
  2128.                   Suppress create, and overwrite prompts.
  2129.  
  2130.         JAR will allow you to specify individual "jy" options in separate
  2131.         switch strings as in "-jyo -jyc". You may inhibit a switch as in
  2132.         "-jyc-".
  2133.  
  2134.  
  2135.       jz: supply file for file comment
  2136.  
  2137.         The "-jz" switch has been provided to facilitate batch commenting
  2138.         of one or more files within an JAR archive. Only one comment file
  2139.         can be specified. That file will be used to comment each file
  2140.         specified on the command line.
  2141.  
  2142.         A comment file containing only a single blank can be used to erase
  2143.         comments from JAR archives. Another method to erase the comment is
  2144.         to specify the predefined filename "NUL".
  2145.  
  2146.         Example: JAR16 c archive -jzNUL
  2147.  
  2148.  
  2149.       ha: ignore readonly Attribute
  2150.  
  2151.         The "-ha" switch sets JAR to reset the attributes of a file to be
  2152.         overwritten or a file to be deleted.  This allows the overwrite or
  2153.         delete operation to proceed.
  2154.  
  2155.         Examples: JAR16 e archive -ha
  2156.                   JAR16 m archive -ha dir\*.*
  2157.  
  2158.  
  2159.       hb: select files by attributes
  2160.  
  2161.         Option requires parameter in the form:
  2162.  
  2163.         [<bits which must be equal 0>'0'][<bits which must be equal 1>'1']
  2164.  
  2165.         Bits encoded as:
  2166.         a - archive
  2167.         d - directory
  2168.         h - hidden
  2169.         r - readonly
  2170.         s - system
  2171.  
  2172.         To emulate the directory handling of archivers such as ARJ, you
  2173.         should use the "-hbd0" option.  Normally, JAR will scan and add all
  2174.         directories that are encountered as files are searched via the
  2175.         wildcards.  With a command like "JAR a test c:\*.doc -r", JAR by
  2176.         will search the C drive for all .DOC files and also add ALL
  2177.         directories found on the C drive unless the option "-hbd0" is
  2178.         specified.
  2179.  
  2180.         Examples: JAR16 a archive c:\* -r -hba1 -b0
  2181.                   Add all files with archive bit set and then reset this bit
  2182.                   JAR16 a archive *.* -r -hbd0
  2183.                   Do not add directories (allows a bit smaller archives)
  2184.                   JAR16 e archive -hbsh0
  2185.                   Extract all files except "system" or "hidden"
  2186.                   JAR16 a archive *.* -hbd0r1
  2187.                   Add readonly files (but NOT directories)
  2188.  
  2189.  
  2190.       he: skip test of security Envelope
  2191.  
  2192.         The "-he" switch sets JAR to skip the verification step when
  2193.         processing a JAR-SECURED archive. If a JAR archive has a damaged
  2194.         JAR-SECURITY envelope, you will have to use the "-he" option to
  2195.         extract the archive.
  2196.  
  2197.  
  2198.       hf: match long and short Filenames
  2199.  
  2200.         This option affects only the Win32 JAR version and is only usable
  2201.         with commands that scan files.
  2202.  
  2203.         By default JAR matches wildcards using only long filenames. This
  2204.         option will match both short and long scanned filenames. This dual
  2205.         matching behavior is the default for the DIR command in Windows 95.
  2206.  
  2207.         Suppose there is a file "New document.doc" with the short name
  2208.         "NEWDOC~1.DOC". Then:
  2209.  
  2210.         JAR32 a archive NEWDOC~1.doc
  2211.         Will report "No such files"
  2212.  
  2213.         JAR32 a archive -hf NEWDOC~1.doc
  2214.         Will add file "New document.doc" to archive as its short name is
  2215.         matched by wildcard
  2216.  
  2217.         Example: JAR32 a archive *~* -x*2* -hf
  2218.                  Add all files in current directory with a short or long
  2219.                  filename that contains "~" but not "2"
  2220.  
  2221.  
  2222.       hf1: use only short Filenames
  2223.  
  2224.         This option affects only the Win32 JAR version and is only usable
  2225.         with commands that scan files.
  2226.  
  2227.         This switch disables long filenames usage. The Win32 JAR version
  2228.         will work like the DOS version during file scanning.
  2229.  
  2230.         Example: JAR32 a archive *~* -x*2* -hf1
  2231.                  Add all files in current directory with a short filename that
  2232.                  contains "~" but not "2"
  2233.  
  2234.  
  2235.       hf2: convert long Filenames into short
  2236.  
  2237.         This option sets JAR to do long filename translation during extract
  2238.         and list commands. It is useful when extracting files in DOS that
  2239.         have been previously compressed by the Win32 JAR version.
  2240.  
  2241.         After reading the archive header JAR converts all long filenames
  2242.         into a shortened form.  The process is similar to that done by
  2243.         Windows 95 to generate short filenames.
  2244.  
  2245.         During this conversion JAR substitutes characters that are not
  2246.         supported in DOS filenames using underscore "_".  Then the filename
  2247.         is trimmed to 8.3 form. If there is another file with the same
  2248.         shortname, "~1","~2",... is appended until the generated shortname
  2249.         is unique.
  2250.  
  2251.         JAR guarantee that files from different directories will remain in
  2252.         different directories after name conversion.
  2253.  
  2254.         Suppose archive contains 3 files:
  2255.         "long name\Document1.doc"
  2256.         "long name2\Document2.doc"
  2257.         "long name2\Document3.doc"
  2258.  
  2259.         After conversion filenames will be:
  2260.         "LONG_NAM\DOCUME~1.DOC"
  2261.         "LONG_N~2\DOCUME~2.DOC"
  2262.         "LONG_N~2\DOCUME~3.DOC" or so.
  2263.  
  2264.         The exact generated short name also depends on the operating system
  2265.         in which the file is stored. This is because the Win32 JAR version
  2266.         always stores the SHORT filename (if available) along with the LONG
  2267.         filename as a HINT for future filename translations. This HINT
  2268.         takes precedence over the JAR filename trimming algorithm.
  2269.  
  2270.         Before extraction you can review conversion results using the "v"
  2271.         command and the "-hf2" option which will show both the original
  2272.         long filename with the shortened name. The "l" and "ls" commands
  2273.         with "-hf2" will show only the shortened filenames. Afterwards, you
  2274.         can extract the files using:
  2275.  
  2276.         JAR16 x archive -hf2
  2277.  
  2278.         The "-hf2" option does not work with update commands.
  2279.  
  2280.  
  2281.       hf3: convert long Filenames into short (second method)
  2282.  
  2283.         This switch works exactly like "-hf2" but also converts those
  2284.         filenames that contain "international" characters with hex code
  2285.         greater than or equal to 0x80.  These characters are substituted
  2286.         with the underscore "_".
  2287.  
  2288.         This option helps to solve problems when extracting filenames
  2289.         encoded using a different OEM code page.
  2290.  
  2291.  
  2292.       hg: access protection method
  2293.  
  2294.         This option accepts argument - method name. Currently, JAR can
  2295.         protect the information in an archive from unauthorized access by
  2296.         using either of two methods:
  2297.  
  2298.         -hg"Authenticate" or
  2299.         -hg"GOST v1.01"
  2300.  
  2301.         The first method establishes archive password WITHOUT actual
  2302.         encryption of its contents. The second method uses GOST 28147-89
  2303.         encryption in CBC mode to encrypt archive files (but NOT archive
  2304.         header which contains comments and filename information).
  2305.  
  2306.         The "Authenticate" method sets JAR to make a password check before
  2307.         processing the archive. If the password is incorrect then JAR
  2308.         aborts. Thus the "Authenticate" method is very fast but the data in
  2309.         the archive is NOT encrypted.
  2310.  
  2311.         The "method" also can be chosen using shorthand notation "-hg0" for
  2312.         "Authenticate" and "-hg1" for "GOST v1.01" encryption.
  2313.  
  2314.         NOTE: Encryption is not available in export JAR version.
  2315.  
  2316.         Any time you are creating a new archive and using the "-g" option
  2317.         (specify password) you can select the protection method using the
  2318.         "-hg" option. Otherwise, JAR will use the "DefaultAccessProtection"
  2319.         setting in the CFG file (see description for more details). The
  2320.         default CFG file specifies to use "Authenticate" if no "-hg" option
  2321.         is specified.
  2322.  
  2323.         You can also specify the method when protecting an unprotected
  2324.         archive with the "y" command:
  2325.  
  2326.         JAR16 y archive -jgpassword -hg1
  2327.  
  2328.         If you need to change the protection method then you must first
  2329.         remove the archive password:
  2330.  
  2331.         JAR16 y archive -gpassword -jg
  2332.  
  2333.         and then protect the archive as in the first example.
  2334.  
  2335.         Because these two protection methods give significantly different
  2336.         security levels, JAR prints different messages when accessing
  2337.         protected archives. JAR prints that an archive is "PROTECTED" when
  2338.         using the "Authenticate" method and "ENCRYPTED" when using the
  2339.         "GOST" method.
  2340.  
  2341.         To access protected archives, you need to specify the password for
  2342.         most operations. The "-jx" option establishes a password check for
  2343.         ALL operations.
  2344.  
  2345.         See "-g", "-jg", "-jx" options for more details.
  2346.  
  2347.         NOTE: The first JAR 1.01 BETA used the now obsolete
  2348.         "Authentication" method to protect an archive.  Please read
  2349.         WHATSNEW.DOC for details.
  2350.  
  2351.  
  2352.       hk: add recovery records
  2353.  
  2354.         This switch sets the global archive flag that specifies adding of
  2355.         data recovery records to the archive after each update.
  2356.  
  2357.         These records allow the repair of a slightly damaged archive. See
  2358.         the "-hx" option on how to use previously stored recovery records.
  2359.  
  2360.         This option increases the size of a medium size archive about 2
  2361.         percent with a minimum of a 2 Kbyte increase. Large files (more
  2362.         than 3 Mbytes) will expand about 0.5 percent in size. This
  2363.         additional space is used to store tables which will allow the
  2364.         repair of archive damage.
  2365.  
  2366.         With a very high probability JAR is able to recover about 28 Kbytes
  2367.         of damaged archive section(s) on a 1440K volume.
  2368.  
  2369.         If your archive is damaged and recovery records are present then
  2370.         JAR will report an error unless the "-hx" option is specified. This
  2371.         option lets JAR recover damaged archive sections "on the fly".
  2372.  
  2373.         The global archive "add recovery records" flag may be turned off on
  2374.         any update using the option "-hk-".
  2375.  
  2376.         Example: JAR16 y archive -hk
  2377.                  Makes archive with "recovery records"
  2378.  
  2379.                  JAR16 y archive -hk-
  2380.                  Makes archive without "recovery records""
  2381.  
  2382.  
  2383.       hl: warn of non-matching wildcards
  2384.  
  2385.         With "-hl" switch JAR reports non-matching wildcards/filespecs
  2386.         during an "add" type command ("a", "f", "m", "u", "ac"). A
  2387.         wildcard/filespec is considered "non-matching" if it does NOT match
  2388.         any files (NOT including directories).
  2389.  
  2390.         JAR will subsequently return a non-zero DOS errorlevel when a
  2391.         non-matching wildcard or filespec has been specified.
  2392.  
  2393.         Example: JAR16 a a:backup !listfile -va -hl -hbd0
  2394.  
  2395.  
  2396.       hm: On or after date YYMMDDHHMMSS
  2397.  
  2398.         The switch "-hm" by itself will select files modified today. If
  2399.         "-hm" is followed by a date and optionally a time, JAR will select
  2400.         files modified on or after that date-time.
  2401.  
  2402.         Example: JAR16 a test -hm9601021700
  2403.                  means select files modified on or after Jan 2, 1996, 5:00 PM.
  2404.  
  2405.         Years less than "80" will be considered as 21st century years.
  2406.  
  2407.         There is no option for using other date-time formats.
  2408.  
  2409.         The switch "-hmb" selects files modified before today. If "-hmb" is
  2410.         followed by a date and optionally a time, JAR will select files
  2411.         modified before that date-time.
  2412.  
  2413.         JAR accepts the use of "-hm" and "-hmb" options simultaneously to
  2414.         specify a range of selected dates. This is useful for selecting
  2415.         files on a specific date.
  2416.  
  2417.         Example: JAR16 a archive *.* -hm910101 -hmb910102
  2418.  
  2419.         The "-hm" option and/or the "-hmb" option will default to today's
  2420.         date at midnight (0000 hrs) when specified without dates.
  2421.  
  2422.         The "-hmd" switch sets JAR to select files no older than the
  2423.         specified number of days.  The days are calculated from midnight.
  2424.  
  2425.         Examples: JAR16 a archive -hmd0    select files modified today
  2426.                   JAR16 a archive -hmd1    select files modified yesterday
  2427.                                            and today
  2428.  
  2429.         "-hmd" and "-hmb" can be combined too.
  2430.  
  2431.  
  2432.       ho: Output directory translation
  2433.  
  2434.         For add type operations the "-ho" option allows one to specify the
  2435.         file destination directory within an archive depending on the file
  2436.         path on disk.
  2437.  
  2438.         This option accepts an argument in the form:
  2439.  
  2440.         -ho<archive path>:<disk path>
  2441.  
  2442.         During add type operations, all files with the specified <disk
  2443.         path> will be preceded with the corresponding <archive path> when
  2444.         storing within an archive.
  2445.  
  2446.         JAR allows one to specify a set of translations. In such a case,
  2447.         the longest match is chosen.  The option "-ho-" disables all
  2448.         translations.
  2449.  
  2450.         Examples: JAR16 a archive c:\* d:\* -hodrive\c:c:\ -hodrive\d:d:\
  2451.                   files from disk "c:" will be stored into "drive\c" and
  2452.                   files from disk "d:" will be stored into "drive\d"
  2453.  
  2454.                   JAR16 a archive src\* src\lib\* -holib:src\lib -hofiles:src
  2455.                   stores files from "src\lib" into "lib\" and other
  2456.                   files from "src\" into "files\"
  2457.  
  2458.         NOTE: The destination directory for a file also depends on the "-o"
  2459.         and "-jf" options. JAR compares the <disk path> letter by letter,
  2460.         so you must specify path in the same form.
  2461.  
  2462.         During extraction JAR does a backward translation (replaces
  2463.         specified archive directory with destination directory).
  2464.  
  2465.         Example: JAR16 x archive -hodrive\c:c:\ -hodrive\d:d:\
  2466.                  files from "drive\c" will be extracted to "c:\" and from
  2467.                  "drive\d" into "d:\". All other files extracted into current
  2468.                  directory.
  2469.  
  2470.         JAR does not support the storing of two files with the same path
  2471.         within an archive.  Also, JAR does not support storing drive
  2472.         letters within an archive.  The "-ho" option provides a workaround
  2473.         for backing up and restoring data from/to different drives or
  2474.         network servers using a single archive.
  2475.  
  2476.         Example:
  2477.         JAR16 a archive \\server\user\* c:\* -hod:\\server\user -hoc:c:
  2478.  
  2479.         The "-ho" option without arguments selects the built-in default
  2480.         translation.  The default option translates all drives "a:\",
  2481.         "b:\"... into archive directories "_a_\", "_b_\"....
  2482.  
  2483.  
  2484.       ht: Test new/updated files
  2485.  
  2486.         This switch tests all newly compressed data. The "-ht0" option
  2487.         tests data using the file's CRC32 value. The "-ht1" option tests
  2488.         data by COMPARING the actual file contents.
  2489.  
  2490.         Example: JAR16 a archive c:\* -r -ht1
  2491.                  Verifies all added files using comparison
  2492.  
  2493.         With the "-w" option JAR will verify that the temporary archive is
  2494.         successfully copied.
  2495.  
  2496.         When used with volume archive this option may cause JAR to re-read
  2497.         previous volumes.
  2498.  
  2499.         You can use "-jt" option to test the whole updated archive. See
  2500.         this option for details.
  2501.  
  2502.  
  2503.       hx: use recovery records
  2504.  
  2505.         Sets JAR to use previously stored records to recover slight archive
  2506.         damage. It may be used with any command.
  2507.  
  2508.         It is recommended that this option be used with an existing archive
  2509.         containing "recovery records" on update operations. JAR does not
  2510.         detect archive damage unless the "-hx" option is specified or the
  2511.         JAR decompression engine fails on damaged data.
  2512.  
  2513.         Updating a damaged archive with "recovery records" without the
  2514.         "-hx" option may result in JAR computing new recovery records using
  2515.         corrupted data.
  2516.  
  2517.         Examples: JAR16 e archive -hx
  2518.                   Extract data from archive using recovery records
  2519.  
  2520.                   JAR16 y archive -hx
  2521.                   Repair damaged archive using recovery records
  2522.  
  2523.  
  2524.       hy: add security envelope
  2525.  
  2526.         JAR adds a security envelope to a JAR archive. This option is only
  2527.         available in the registered JAR version.
  2528.  
  2529.         The JAR-SECURITY ENVELOPE feature provides a facility similar to
  2530.         other archivers. This feature disallows any type of modification,
  2531.         even commenting, to a JAR-SECURE sealed archive by JAR. Moreover,
  2532.         there are additional internal checks to determine if the JAR-SECURE
  2533.         sealed archive has been modified in any way. This feature is
  2534.         intended for use by software developers who distribute their
  2535.         software in archived format or for businesses that distribute data
  2536.         files. However, there can be no guarantee that this mechanism
  2537.         cannot be defeated.
  2538.  
  2539.         When processing a JAR-SECURED archive, JAR will display a message
  2540.         indicating that JAR is verifying the security envelope. If the
  2541.         envelope is damaged, a message will be displayed indicating so. If
  2542.         the envelope is intact, then the JAR-SECURITY signature of the user
  2543.         "sealing" the archive will be displayed.
  2544.  
  2545.  
  2546.       hz: comment chapters
  2547.  
  2548.         This switch is used to comment a chapter during an update
  2549.         operation. It also may be used to specify a comment file.
  2550.  
  2551.         Examples: JAR16 ac archive c:\* -hz
  2552.                   Add new chapter and prompt for the comment for it
  2553.  
  2554.                   JAR16 c archive -hzcomment.txt -jb1-10
  2555.                   Comment chapters from 1 to 10 using file comment.txt
  2556.  
  2557.                   JAR16 c archive -hznul -jb"-"
  2558.                   Clears all chapter comments
  2559.  
  2560.  
  2561.     CONFIGURATION FILE:
  2562.  
  2563.  
  2564.       JAR uses a configuration file to store global user settings. By
  2565.       default the configuration file is named "JAR.CFG" and must be placed
  2566.       into the same directory as the JAR16.EXE and JAR32.EXE directory.
  2567.  
  2568.       The environment variable JAR_CFG_FILE is used to specify an alternate
  2569.       JAR configuration file location.
  2570.  
  2571.       Example: SET JAR_CFG_FILE=c:\user\jar.cfg
  2572.  
  2573.       The JAR configuration file format is very similar to Windows *.INI
  2574.       files. It contains strings of three types:
  2575.  
  2576.       1. Comments.  This string must start with ";" character
  2577.  
  2578.       2. Keys with set values in the form:
  2579.          <Key name>=<value>
  2580.          Key name is case insensitive.
  2581.  
  2582.       3. Section separators in the form:
  2583.          '['<Section name>']'
  2584.          Section name is case insensitive.
  2585.  
  2586.       Example:
  2587.       [OS/2 settings]
  2588.       ColoredOutput=No
  2589.       ; black and white output
  2590.       SwapFileDirectory=h:\tmp
  2591.  
  2592.       The given example contains one line with the section name, two lines
  2593.       with keys, and one line with a comment.
  2594.  
  2595.       On startup JAR reads predefined key values from the configuration
  2596.       file and uses these values as global settings.
  2597.  
  2598.       Sections are used to keep setting variants in a single file. You can
  2599.       set the JAR_CFG_SECTION environment variable to a section name which
  2600.       will take precedence over default values.
  2601.  
  2602.       Example:
  2603.  
  2604.       SwapFileDirectory=c:\tmp
  2605.       [OS/2 settings]
  2606.       SwapFileDirectory=d:\tmp
  2607.       [Windows NT settings]
  2608.       SwapFileDirectory=e:\tmp
  2609.  
  2610.       If JAR_CFG_SECTION has the value "OS/2 settings" then the JAR swap
  2611.       file will be located on drive D. If JAR_CFG_SECTION has the value
  2612.       "Windows NT settings" then the JAR swap file will be located on drive
  2613.       E. Otherwise, it will be located on drive C.
  2614.  
  2615.       If JAR does not find a key in the configuration file then it uses
  2616.       built-in default values.
  2617.  
  2618.  
  2619.     CONFIGURATION FILE KEYWORDS:
  2620.  
  2621.  
  2622.       The right side of "=" describes default key value (used if it is not
  2623.       set within configuration file).
  2624.  
  2625.  
  2626.       ColoredOutput=No
  2627.  
  2628.         Possible values: Yes/No. Specifies the kind of JAR screen output.
  2629.  
  2630.  
  2631.       SwapFileDirectory=
  2632.  
  2633.         JAR chooses the swap file valid directory in the following order:
  2634.         - from CFG file but not equal to ""
  2635.         - from TMP environment variable (DOS JAR version) or temporary
  2636.           directory (Win32 JAR version)
  2637.         - current directory
  2638.  
  2639.         JAR swap file usage depends on the total files in archive and on
  2640.         command type. JAR may need up to a 2 Mbytes swap file when updating
  2641.         an existing medium-size archive (with about 1,000 files).
  2642.  
  2643.         Example: SwapFileDirectory=c:\tmp
  2644.  
  2645.  
  2646.       FullPath=Yes
  2647.  
  2648.         Possible values: Yes/No. Specifies the "-jf" switch default for
  2649.         JAR. Users who want ARJ-like file path storing should set this key
  2650.         to "Yes". Users who want UC2-like file path storing should set this
  2651.         key to "No".
  2652.  
  2653.  
  2654.       DefaultAccessProtection=Authenticate
  2655.  
  2656.         Possible values: "Authenticate" or "GOST v1.01". Specifies default
  2657.         archive protection method. See "-hg" option for details.
  2658.  
  2659.  
  2660.       XmsLimit=1024
  2661.       EmsLimit=0
  2662.  
  2663.         These settings LIMIT MAXIMUM XMS and EMS usage (in kilobytes) by
  2664.         the program. These settings are used only by the DOS JAR version.
  2665.         You can set corresponding values to 0 so JAR will not use XMS/EMS
  2666.         at all.
  2667.  
  2668.         It is strongly recommended to let JAR use at least 1024 kilobytes
  2669.         of XMS for better performance. Recommended - 3072. JAR does not
  2670.         necessarily use all the specified memory; instead, it chooses an
  2671.         optimal value based upon need. The maximum practical value is 5120.
  2672.  
  2673.         JAR uses EMS for better compression. JAR conventional memory
  2674.         consumption also decreases by about 60 kilobytes when EMS is
  2675.         available. Optimal value - 4096. Maximum amount used by JAR -
  2676.         16384. When more EMS is available, a better compression rate can be
  2677.         achieved.
  2678.  
  2679.         IMPORTANT NOTE: See the CheckAvailableMemory keyword for memory
  2680.         usage details.
  2681.  
  2682.  
  2683.       CheckAvailableMemory=Yes
  2684.  
  2685.         Possible values: Yes/No. If this key value is set to "Yes" then JAR
  2686.         empirically tests available memory before the compression engine
  2687.         starts and sets internal memory consumption limits that should not
  2688.         result in a decrease in overall system performance.
  2689.  
  2690.         Multitasking operating systems like OS/2 or Windows 95 report
  2691.         available virtual memory instead of real "physical" memory. A large
  2692.         allocation of virtual memory amount may drastically slow down the
  2693.         OS or even hang it due to a lack of resources.
  2694.  
  2695.         JAR uses memory access timings to allocate only "safe" memory
  2696.         amounts.
  2697.  
  2698.         If you are an experienced user you may toggle this feature off.
  2699.         Then JAR will not test for available memory, but will use as much
  2700.         as it decides but no more than the set current limits (see
  2701.         XmsLimit, EmsLimit, 32MemoryLimit). JAR also starts faster when the
  2702.         "No" value is set.
  2703.  
  2704.         This setting is ignored by list and extraction JAR commands.
  2705.  
  2706.  
  2707.       32MemoryLimit=0
  2708.  
  2709.         Limits memory usage by the COMPRESSION ENGINE. This setting is used
  2710.         only by the Win32 JAR version. Recommended value 4096. Maximum
  2711.         which may be used - 10240 kilobytes.
  2712.  
  2713.         IMPORTANT NOTE: See the CheckAvailableMemory keyword for memory
  2714.         usage details.
  2715.  
  2716.  
  2717.       DOS InteractiveCriticalErrorHandler=Yes
  2718.  
  2719.         Possible values: Yes/No. The interactive handler asks "Abort,
  2720.         Retry?" on such hardware errors like "Drive not ready". For batch
  2721.         processing you can disable these prompts.
  2722.  
  2723.         This setting is used only by the DOS JAR version.
  2724.  
  2725.  
  2726.       ErrorsToStdout=No
  2727.  
  2728.  
  2729.         If "Yes" then reports errors to stdout instead of stderr. So you
  2730.         redirect error messages to a file using ">" or ">>" as well as all
  2731.         other JAR output.
  2732.  
  2733.  
  2734.       EmulateANSIComments=Yes
  2735.  
  2736.         Possible values: Yes/No. This option is used to disable the JAR
  2737.         ANSI comments emulation.
  2738.  
  2739.  
  2740.       OptionsForCommand A=
  2741.       OptionsForCommand AC=
  2742.       ...
  2743.  
  2744.         This group of keys is used to specify SEPARATE default options for
  2745.         ANY JAR command. The specified options are parsed before the
  2746.         command line is parsed.  So you always can overwrite this setting.
  2747.  
  2748.         Examples: OptionsForCommand L=-ju1
  2749.                   Now "l" command by default will sort files by extension
  2750.  
  2751.                   OptionsForCommand V=-ju- -r-
  2752.                   By default "v" command will not sort and recurse files
  2753.  
  2754.  
  2755.       HideMarkedFiles=Yes
  2756.  
  2757.         Possible values: Yes/No. This setting hides the "Marking file"
  2758.         message for "ac" command.
  2759.  
  2760.  
  2761.       DefaultColor=7
  2762.       ErrorColor=12
  2763.       SignalColor=15
  2764.       CommentColor=3
  2765.       HighlightColor=2
  2766.  
  2767.         Possible values 0-15. It is used to customize colored JAR output.
  2768.         The following table must be used for color translation:
  2769.  
  2770.         BLACK   (0)    GREY          (8)
  2771.         BLUE    (1)    LIGHT BLUE    (9)
  2772.         GREEN   (2)    LIGHT GREEN   (10)
  2773.         CYAN    (3)    LIGHT CYAN    (11)
  2774.         RED     (4)    LIGHT RED     (12)
  2775.         MAGENTA (5)    LIGHT MAGENTA (13)
  2776.         BROWN   (6)    YELLOW        (14)
  2777.         WHITE   (7)    LIGHT WHITE   (15)
  2778.  
  2779.  
  2780.       HighIntensityColors=No
  2781.  
  2782.         Possible values: Yes/No. It uses only "light" colors for JAR
  2783.         output. This may be useful for windowed DOS sessions.
  2784.  
  2785.  
  2786.     IMPORTANT DIFFERENCES BETWEEN JAR AND ARJ:
  2787.  
  2788.  
  2789.       Most JAR commands and switches follow ARJ naming. This DOES NOT mean
  2790.       that all JAR options and commands work exactly as in ARJ. Please read
  2791.       the documentation for details.
  2792.  
  2793.       These are a list of useful options that work slightly differently
  2794.       from ARJ:
  2795.  
  2796.       -b0 -b1 -r -jb -jf -hf -hg
  2797.  
  2798.       These are a list of options that have different meanings:
  2799.  
  2800.       -o -jg -jl -ju -js -jx -hm -ho -ht -hx -hz
  2801.  
  2802.       JAR DOES NOT support the ARJ base/target directory option. JAR
  2803.       provides the "-o" option instead.
  2804.  
  2805.       JAR always adds files with "system" and "hidden" attributes. ARJ by
  2806.       default does not.
  2807.  
  2808.       By default during an add command, JAR adds all directories scanned
  2809.       while searching for files that match the specified wildcards.  An
  2810.       archive may be created with directory names only even if no files
  2811.       were found.  For example, "JAR16 a archive c:\abcdefgh.* -r" would
  2812.       create an archive containing every directory name on drive C and
  2813.       probably no files.  Use the "-hbd0" option to not include the
  2814.       directories.
  2815.  
  2816.       By default for commands that scan an archive, JAR wildcarding uses
  2817.       directory recursion.  This means that the specified directory and all
  2818.       sub-directories will be scanned by the command.  To get ARJ-like
  2819.       scanning behavior, you need to specify the "-r-" option to turn off
  2820.       recursion.
  2821.  
  2822.       Example: JAR16 x archive dir\docs\*.* -r-
  2823.  
  2824.       Unlike ARJ, JAR cannot join archives. Instead, JAR has the option of
  2825.       using the "y" command to join volumes into a single "solid" archive.
  2826.       It is also possible to change archive volume size.
  2827.  
  2828.  
  2829.     JAR LIMITATIONS:
  2830.  
  2831.  
  2832.       JAR uses a "central directory" scheme to store information about the
  2833.       compressed files in an archive. Since such a directory may be very
  2834.       large, JAR uses built-in virtual memory (VM) which allows JAR to work
  2835.       in a limited amount of physical memory (then swap file is used). VM
  2836.       is also used to store other intermediate data: list of files to add,
  2837.       temporary compression buffers, etc.
  2838.  
  2839.       During archive UPDATE operations VM size is limited to 25 Mbytes. If
  2840.       JAR exceeds this then the update operation fails. As a result, the
  2841.       maximum number of files that can be stored within an archive is about
  2842.       80,000 files (depends on files path length). An archive compressed
  2843.       with the "-m4" method can be updated if it contains less than about
  2844.       40,000 files.
  2845.  
  2846.       DOS JAR version memory usage:
  2847.  
  2848.                    EMS available   No EMS, XMS only   No EMS and XMS
  2849.                    -------------   ----------------   --------------
  2850.  
  2851.        Update         431K(*)            484K              517K
  2852.        commands
  2853.  
  2854.        Extract         368K              434K              467K
  2855.        commands
  2856.  
  2857.        List            351K              351K              384K
  2858.        commands
  2859.  
  2860.        (*) - 484K for "-m1" method
  2861.  
  2862.        "K" means kilobyte (1024 bytes)
  2863.  
  2864.        Processing an ENCRYPTED archive requires an additional 8 Kbytes of
  2865.        memory.
  2866.  
  2867.  
  2868.     JAR ARCHIVE ACCESS MODES:
  2869.  
  2870.  
  2871.       Below is a description of the archive file opening modes used by JAR.
  2872.       This information may be important when sharing archives on networks.
  2873.  
  2874.       JAR does the following steps:
  2875.  
  2876.       1. Opens archive file (last volume), reads archive header and then
  2877.          closes archive file. Sometimes archive header does not fit in the
  2878.          last volume and is distributed within the last few volumes.
  2879.  
  2880.       2. Using the archive header information, JAR decides which archive
  2881.          volume is required for future processing.
  2882.  
  2883.       3. Opens necessary volume, reads data, opens another volume and so
  2884.          on...
  2885.  
  2886.       So even in case of a single volume, JAR opens an archive twice.
  2887.       First to read the header and second to read the actual compressed
  2888.       data.
  2889.  
  2890.       On update type operations both DOS and Win32 JAR open an archive
  2891.       using "DENY READ and WRITE" mode (exclusive mode).
  2892.  
  2893.       On non-update type operations DOS JAR opens an archive using
  2894.       "COMPATIBILITY" mode and Win32 JAR - using "DENY WRITE" mode.
  2895.  
  2896.       As a result you can simultaneously list or extract from archives on
  2897.       network.
  2898.  
  2899.  
  2900.  
  2901.     JAR ARCHIVE FLAGS:
  2902.  
  2903.  
  2904.       JAR shows the archive flags and archive comment any time the archive
  2905.       is accessed. Here is a list of possible flags with a short
  2906.       explanation:
  2907.  
  2908.       ENCRYPTED
  2909.  
  2910.         Archive is protected using encryption.
  2911.  
  2912.       PROTECTED
  2913.  
  2914.         Archive is protected using "Authenticate" method.
  2915.  
  2916.       PROTECTED(obsolete method)
  2917.  
  2918.         Archive is protected using "Authentication" method. This obsolete
  2919.         method was used by the first JAR 1.01 BETA.  Please read
  2920.         WHATSNEW.DOC for details.
  2921.  
  2922.       HIDDEN
  2923.  
  2924.         Archive created using "-jx" option (requires password for any
  2925.         command).
  2926.  
  2927.       SECURED
  2928.  
  2929.         JAR_SECURED archive created using "-hy" option.
  2930.  
  2931.       RECOVERY RECORDS
  2932.  
  2933.         Archive contains recovery records ("-hk" option).
  2934.  
  2935.       LOCKED
  2936.  
  2937.         Archive is locked using "-jl" option. Archive cannot be updated.
  2938.  
  2939.       AUTO-LOCK
  2940.  
  2941.         Archive is auto-lockable ("-jl2" option).
  2942.  
  2943.  
  2944.     JAR ERROR LEVELS:
  2945.  
  2946.  
  2947.       0 ->  success
  2948.       1 ->  warning
  2949.       2 ->  fatal error
  2950.       3 ->  CRC error
  2951.       5 ->  disk full or write error
  2952.       6 ->  cannot open archive
  2953.       7 ->  simple user error (bad parameters)
  2954.       8 ->  not enough memory
  2955.       9 ->  not a JAR archive
  2956.       10 -> internal error
  2957.       11 -> Ctrl+C pressed
  2958.  
  2959.  
  2960.     FINAL COMMENTS:
  2961.  
  2962.  
  2963.       We do hope that you find this program as useful as we have. We would
  2964.       appreciate any suggestions to improve this archiver.
  2965.  
  2966.       You can reach us at:
  2967.  
  2968.       Internet address:  robjung@world.std.com
  2969.  
  2970.       CompuServe userid: 72077,445
  2971.  
  2972.       JAR users are encouraged to use the above addresses to submit
  2973.       questions, problems, and new features requests.
  2974.  
  2975.  
  2976.       ***** UPDATED MAILING ADDRESS *****
  2977.  
  2978.       Robert and Susan Jung
  2979.       ARJ Software
  2980.       P.O. Box 249
  2981.       Norwood MA 02062
  2982.       USA
  2983.  
  2984.       Fax number: 617-769-4893
  2985.  
  2986.       ***********************************
  2987.  
  2988.  
  2989.     end of document
  2990.