home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / sharewar / jar / jar101dx.exe / REARJ.DOC < prev    next >
Text File  |  1996-10-11  |  21KB  |  507 lines

  1.  
  2.     USER'S MANUAL FOR THE REARJ ARCHIVE CONVERSION PROGRAM  September 1996
  3.  
  4.  
  5.        REARJ software and manual copyright (c) 1991-96 by ARJ Software.
  6.        All rights reserved.
  7.  
  8.        REARJ version 2.25 release
  9.  
  10.     *********************************************************************
  11.  
  12.     REARJ originally was been designed to provide conversion to the ARJ
  13.     format.  However, it may be used to convert into the JAR format, too.
  14.     In this package, the REARJ.CFG file is modified to convert into the
  15.     JAR format by default using the DOS archiver version.
  16.  
  17.     REARJ does not support long filenames.
  18.  
  19.     *********************************************************************
  20.  
  21.  
  22.     INTRODUCTION:
  23.  
  24.     REARJ is an archive conversion program designed to facilitate the
  25.     conversion between LZH, ZIP, PAK, ARC, DWC, HYP, LZS, ZOO, ARJ, JAR
  26.     archives.
  27.  
  28.  
  29.     MAJOR FEATURES:
  30.  
  31.     Supports all major archiver programs (PAK, LHARC, PKZIP, ZOO, ARJ,
  32.     PKPAK, DWC, HYPER, LARC, LHA, JAR).
  33.  
  34.     Supports file attributes within archives.
  35.  
  36.     Supports directories within archives.
  37.  
  38.     Supports converting archives within archives (ZIPs in a ZIP).
  39.  
  40.     Ensures reliable archive conversion with a file count and total size
  41.     check.
  42.  
  43.     Supports the use of virus checkers and BBS ad removers.
  44.  
  45.     Supports recursive scanning through subdirectories.
  46.  
  47.     Optional logging of conversions.
  48.  
  49.  
  50.     ********************
  51.     * WORDS OF CAUTION:*
  52.     ********************
  53.  
  54.     If you plan to convert many archives at one time, it is STRONGLY
  55.     suggested that you make a backup of your hard disk.  This is a wise
  56.     precaution to take any time that you make major modifications to data
  57.     on your hard disk drive.
  58.  
  59.     The standard REARJ conversion DOES NOT convert any archive comments
  60.     and volume labels.  They will be lost.
  61.  
  62.     Some of the other archivers have significant bugs which can cause data
  63.     loss that REARJ cannot detect.  It is not the purpose of this document
  64.     to point out other program's shortcomings.  I suggest logging the
  65.     conversion output to a printer to facilitate checking for errors.
  66.  
  67.     If the archives you are converting will ONLY extract to absolute
  68.     paths, you must use the /w option to set the working directory to an
  69.     empty root directory such as a RAMDRIVE.  This will allow extraction
  70.     to the root.
  71.  
  72.     REARJ and the archiver executables must be located in the DOS PATH
  73.     directories.  This is due to REARJ creating and using a temporary
  74.     directory.
  75.  
  76.     If you have changed the MS-DOS switch character from "/" to another
  77.     character via an undocumented MS-DOS interrupt or the TurboC
  78.     setswitchar() function, REARJ may not work properly with the default
  79.     REARJ.CFG configuration file.
  80.  
  81.     The most thorough testing was done with ARJ as the target format and
  82.     ZIP as the original format.  In any case, you should verify that the
  83.     extract commands of your favorite archive formats in the configuration
  84.     file are correct.  The extract commands are the most important to get
  85.     right because REARJ has a built-in verification procedure to ensure
  86.     that the ADD commands executed properly.
  87.  
  88.     You should NOT set the "-t1" option for ARJ in ARJ_SW or in the
  89.     REARJ.CFG configuration file.  This may cause file size mismatches.
  90.  
  91.     Be sure you have enough disk space on your working directory to
  92.     extract the largest archive that you want to convert!!!
  93.  
  94.  
  95.     The versions of archivers tested:
  96.  
  97.     ARJ   1.00, 1.10, 2.00, 2.10, 2.20, 2.21, 2.30, 2.41a, current release
  98.     LHA   2.12, 2.13
  99.     PAK   2.51
  100.     PKZIP 1.10
  101.     PKPAK 3.61
  102.     ZOO   2.01, 2.10
  103.     DWC   A5.01
  104.     LARC  3.33
  105.     HYPER 2.5
  106.     JAR   1.01
  107.  
  108.  
  109.     INSTALLATION:
  110.  
  111.     Copy REARJ.EXE and REARJ.CFG to one of the DOS PATH directories.  They
  112.     do not have to be placed in the same directory.  The PATH directories
  113.     are usually set by the PATH command in your AUTOEXEC.BAT file.  At
  114.     this version of REARJ, changing its name to something else will cause
  115.     operation difficulties.
  116.  
  117.     Be sure the archiver programs (ARJ, PAK, PKZIP, PKUNZIP, etc.) and
  118.     virus scanner are installed in a DOS PATH directory!  It is STRONGLY
  119.     recommended that the REARJ.CFG be modified to use FULL PATHNAMES to
  120.     specify all archiver executables.
  121.  
  122.     This version assumes that you have the new SCAN version 80 and use
  123.     the new option /sub to scan subdirectories.  This version's
  124.     configuration file also assumes that SCAN.EXE is installed in
  125.     the directory C:\BIN.
  126.  
  127.  
  128.     OPERATION OF REARJ:
  129.  
  130.     REARJ will build a temporary directory in the current directory and
  131.     extract the archive(s) to this directory.  REARJ will then build the
  132.     target archive(s) with the files in this directory.  If the target
  133.     archiver does not support reading of hidden or system files, REARJ
  134.     will reset those bits and then re-archive the files without those
  135.     attributes.  If the original archive has directories in it, REARJ will
  136.     extract it with full paths and re-archive it with full paths if the
  137.     target archiver supports directories.  In this case, if the archiver
  138.     does not support directories, REARJ will skip converting this archive.
  139.  
  140.     If the "/a" option has been selected, REARJ will execute REARJ to
  141.     convert any internal archives of the same type to the target format.
  142.     Any "/s" option will be carried over to the recursive REARJ command.
  143.  
  144.     As an extra test, REARJ will count the files extracted from the
  145.     original archive and total their sizes.  Then REARJ will extract the
  146.     new archive and count the files and total the sizes.  If the count and
  147.     size do not match, REARJ will skip converting the archive.
  148.  
  149.     REARJ assumes that the supported archivers will pass a non-zero error
  150.     code when there is an operation failure.
  151.  
  152.  
  153.     COMMAND SYNTAX:
  154.  
  155.     REARJ [switch options] filespec(s) or wildspec(s)
  156.  
  157.     You can specify one or more filespecs on the command line.  These
  158.     filespecs can have paths and wildcards.  Up to 100 filespecs can be
  159.     accepted by REARJ.  If you specify *.* as a wildspec, REARJ will look
  160.     at all filenames, but will skip those filenames not ending in standard
  161.     archive suffixes.  If you specify the /r switch, REARJ will look for
  162.     filenames matching the filespec(s) in the current directory and all
  163.     subdirectories of the current directory.
  164.  
  165.     The switch options and filespecs can be entered in any order.  REARJ
  166.     uses the default MS-DOS switch character "/".  REARJ uses the Turbo
  167.     C++ function getswitchar() to determine the MS-DOS switch character.
  168.     If the switch character is "-", REARJ will translate any UNIX style
  169.     pathnames to MS-DOS syntax ("dir/file" to "dir\file").
  170.  
  171.  
  172.     SWITCH OPTIONS:
  173.  
  174.     /a - convert archives within archives
  175.  
  176.    This option causes REARJ to recursively execute REARJ to convert
  177.    any archives of the original type found within the original
  178.    archive (ex. ZIPs within a ZIP).  This option requires additional
  179.    memory to execute successfully.
  180.  
  181.    You may specify the type of internal archive to convert with the
  182.    "/a" option.
  183.  
  184.    Examples:  REARJ *.zip /aLZH  convert only internal LZH archives.
  185.         REARJ *.zip /a*  convert any internal archive.
  186.  
  187.    If you use the "/a*" option, you may need to also specify "/u"
  188.    because of nested archives of the target type.
  189.  
  190.     /b - execute command before extracting files
  191.  
  192.    This option is used to specify a DOS command to be executed before
  193.    extracting the original archive.
  194.  
  195.    In addition, REARJ passes the name of the original archive to
  196.    this command as a command line argument when executing it.  This
  197.    may cause a problem with DOS commands that expect no arguments.
  198.    A workaround would be to install the DOS command in a batch file.
  199.  
  200.    This feature is to allow the user to prep the environment before
  201.    extracting the archive.  This can be used to prep for archive
  202.    comments or volume labels, etc.
  203.  
  204.     /c - execute command on extracted files before counting them
  205.  
  206.    This option is used to specify a DOS command to be executed upon
  207.    the extracted files before REARJ counts them for later
  208.    verification.  This is to allow executing a DOS or batch command
  209.    to clean up the extracted files (remove BBS advertisements, etc).
  210.    REARJ does not check for any returned error code from the
  211.    executed command.
  212.  
  213.    In addition, REARJ passes the name of the original archive to
  214.    this command as a command line argument when executing it.  This
  215.    may cause a problem with DOS commands that expect no arguments.
  216.    A workaround would be to install the DOS command in a batch file.
  217.  
  218.     /d - delete the original archive
  219.  
  220.    This option causes REARJ to delete the original archive after a
  221.    successful conversion to the target format.  This option will NOT
  222.    delete read-only archives.
  223.  
  224.     /e - do not return error if no archives were found
  225.  
  226.    This option is used by the internal recursive REARJ.  This option
  227.    will cause REARJ to return a zero exit code if no matching
  228.    archives were found.  Usually, REARJ returns a non-zero exit
  229.    code for this condition.
  230.  
  231.     /f - convert diskette archives
  232.  
  233.    This option is used to facilitate the conversion of archives on a
  234.    diskette.  If you do not have sufficient space on the diskette to
  235.    keep the original archives, you MUST specify the "/d" option as
  236.    in "REARJ A:*.zip /f /d".
  237.  
  238.    This option causes REARJ to build the target archive in the
  239.    CURRENT directory (not the working temporary directory).  After
  240.    verification, REARJ will, if specified, delete the original
  241.    archive and then copy the new archive to the diskette.  You
  242.    should make sure that the current directory does not contain any
  243.    archives before executing REARJ.
  244.  
  245.     /i - check program integrity
  246.  
  247.    This option causes REARJ to validate the REARJ program on disk.
  248.    If you are using a pre-3.0 MS-DOS revision, you will have to
  249.    specify the full program name as in "REARJ /i\util\rearj.exe".
  250.  
  251.     /l - write conversion data to log file
  252.  
  253.    This option causes REARJ to open a log file and record each
  254.    successful conversion in the log file.  The default log filename
  255.    is REARJ.LOG.  You can specify the log filename as in
  256.    "REARJ /lfilename *.ZIP".  If the log file already exists, REARJ
  257.    will append logging data to it.
  258.  
  259.     /o - overwrite existing target archive
  260.  
  261.    This switch is used to delete already existing target archives.
  262.    This is not used for updating archives.  Use the /u option for
  263.    updating an archive.
  264.  
  265.     /q - query for each archive to convert
  266.  
  267.    This switch causes REARJ to pause and prompt the user for
  268.    permission to convert individual archives.  Note that REARJ will
  269.    not prompt when skipping archives.
  270.  
  271.     /r - recurse through subdirectories
  272.  
  273.    This switch causes REARJ to look for archives in all included
  274.    subdirectories as well as in the current directory.  This switch
  275.    allows the user to convert all archives on a hard disk with one
  276.    command.
  277.  
  278.     /s - skip verify of file count and total size
  279.  
  280.    Skip the overhead of the file count and total size verification
  281.    process.  This verification costs an extra extraction, but this
  282.    check is worth the time, especially when converting a large
  283.    number of archives.
  284.  
  285.     /t - specify the target archive type
  286.  
  287.    The default target archive format is normally JAR.  This can be
  288.    changed by building an external REARJ.CFG file.  The first
  289.    archive type is always the default format.  To override the
  290.    default format, the user can specify the /t switch as in
  291.    "REARJ *.ZIP /tlzh".  The previous example has specified that LZH
  292.    is the target format.
  293.  
  294.     /u - allow update of archive with backup
  295.  
  296.    This switch is used to re-archive an archive, possibly to take
  297.    advantage of improved compression.  The original archive is
  298.    backed up by renaming it with the backup suffix which by default
  299.    is "BAK".  You may specify another backup suffix with the /u
  300.    option as in "REARJ *.ARJ /uar$" where the backup suffix is
  301.    "ar$".  Since this option creates a brand new archive, archive
  302.    comments will be lost.  Do NOT specify a "." in the suffix.
  303.  
  304.     /v - execute configured command on extracted files
  305.  
  306.    This switch is used to execute a configure command on the files
  307.    extracted from the original archive.  The intent is to allow
  308.    virus scanning of the archive contents.  The command must be
  309.    specified in the REARJ.CFG file.
  310.  
  311.    The command may be placed in the REARJ.CFG file by inserting one
  312.    line ahead of the archive commands.  The line must start with the
  313.    word "VIRUS" followed by a blank and the external command.
  314.  
  315.    Example:  VIRUS scan /nomem *.*
  316.  
  317.    If the invoked command returns a non-zero error code, REARJ will
  318.    skip the conversion of that archive and log the error as code 13.
  319.  
  320.    REARJ *.* /v
  321.  
  322.     /w - set working directory
  323.  
  324.    By default, REARJ creates a temporary working directory in the
  325.    current directory.  This option allows you to specify the working
  326.    directory.  The working directory must be EMPTY when invoking
  327.    REARJ.  This directory is used to hold the extracted files.
  328.    This is NOT considered the current directory for /f use.
  329.  
  330.    Example:  REARJ *.* /wd:\
  331.  
  332.    This option helps solve the absolute pathname extraction problem
  333.    that some archivers have.  If you set the working directory to an
  334.    empty root directory, the archiver can extract to the root and
  335.    REARJ will be able to find all of the files to re-archive them.
  336.    However, this option will NOT work for internal archives that
  337.    extract to absolute paths.
  338.  
  339.     /x - exclude filenames or wildnames from the conversion process
  340.  
  341.    You can exclude one or more files from the conversion process.
  342.    The filenames can contain wildcards.
  343.  
  344.    REARJ *.ZIP /xONE.ZIP /xTWO.ZIP
  345.  
  346.     /z - simulate conversion process
  347.  
  348.    This switch causes REARJ to simulate the conversion process.  No
  349.    archives will be extracted, built, or deleted.
  350.  
  351.  
  352.     EXAMPLES:
  353.  
  354.     REARJ *.ZIP             this converts all ZIP files in the current
  355.                             directory to JAR files.
  356.  
  357.     REARJ *.ZIP *.ARC       this converts ZIP and ARC files to JAR
  358.                             files.
  359.  
  360.     REARJ SOFT.ZIP          this converts only SOFT.ZIP to SOFT.J.
  361.  
  362.     REARJ A:*.ZIP /f /d     convert ZIPs on A drive with deletion of
  363.                             each original archive upon successful
  364.                             conversion.
  365.  
  366.     REARJ *.ARC /r          this converts all ARC files in the current
  367.                             directory and in subdirectories of the
  368.                             current directory to JAR files.
  369.  
  370.     REARJ SOFT.ARJ /tZIP    this converts SOFT.ARJ to SOFT.ZIP.
  371.  
  372.     REARJ *.J /u            re-archive all JAR archives.
  373.  
  374.     REARJ *.* /v /wd:\      re-archive all archives and execute
  375.                             configured command on extracted files
  376.                             using d:\ as the temp directory.
  377.  
  378.  
  379.     EXTERNAL CONFIGURATION FILE
  380.  
  381.     REARJ comes with a configuration file, REARJ.CFG, which supports
  382.     conversion between the ARJ, ARC, LZH, PAK, ZIP, DWC, LZS, HYP, ZOO,
  383.     JAR formats.  The commands PKPAK and PKUNPAK are used for ARC files.
  384.     The command LHA is used for LZH files.  You can change these defaults
  385.     by editing the configuration file.
  386.  
  387.     The format of the configuration file is fairly simple.
  388.  
  389.     The first line can optionally specify an external command to be
  390.     executed by REARJ when the "/v" option is selected.  This line must
  391.     start with the word "VIRUS" minus the quotes, followed by a space,
  392.     followed by the external command.  The external command MUST contain
  393.     a fully specified pathname for security reasons.
  394.  
  395.     Example:  VIRUS C:\BIN\SCAN /nomem *.*
  396.  
  397.     If you do not want to configure this item, DO NOT insert a blank line.
  398.  
  399.     Each archive format requires four lines in the file.
  400.  
  401.     The first line is the format suffix.
  402.  
  403.     The second line is the archive ADD command with a %s in the place of
  404.     the archive name.  Any other percent signs in the command must be
  405.     preceded by "\" as in "\%".  The ADD command should support directory
  406.     inclusion and reading of hidden and/or system files.  REARJ will parse
  407.     this command line using the space character as the token separator.
  408.  
  409.     If your ADD command requires DOS piping as the ZOO archiver requires,
  410.     you must precede the ADD command with the text "COMMAND /C ".
  411.  
  412.     Example:  ARJ a -a -r -jt %s
  413.               COMMAND /C STUFF *.* | ZOO aI %s
  414.  
  415.     The third line is the archive EXTRACT command with a %s in the
  416.     place of the archive name.  Any other percent signs in the command
  417.     must be preceded by "\" as in "\%".  The EXTRACT command should
  418.     support directory recreation if the archive contains directories.
  419.     The extraction of directories must be to child directories within the
  420.     current directory.  REARJ will parse this command line using the space
  421.     character as the token separator.
  422.  
  423.     If your EXTRACT command requires DOS piping, you must precede the
  424.     EXTRACT command with the text "COMMAND /C ".  Beware that command exit
  425.     codes are not passed back to REARJ when using COMMAND /C.
  426.  
  427.     The fourth line contains the letters "A" and/or "D" or no letters.
  428.     The "A" stands for the ability to process files with the hidden and/or
  429.     system attribute.  The "D" stands for full support of directory trees
  430.     within archives.  No letters (blank line) stands for no support for
  431.     hidden or system files or for archive containing directories.
  432.  
  433.     There must be NO EXTRA blank lines or comments in the file.  You may
  434.     use leading blanks for clarity.
  435.  
  436.     See the supplied REARJ.CFG for the current configuration.
  437.  
  438.     If you use a different archiver program, you will need to either
  439.     rename the program to one of the supported ones or you will need to
  440.     modify the installed REARJ.CFG file.
  441.  
  442.     If your original archive format supports extraction to absolute
  443.     directory paths as opposed to relative directory paths and you have
  444.     such archives containing absolute paths, you should not put directory
  445.     extraction in the REARJ.CFG file unless you use the /w option to set
  446.     the working directory to an empty root directory.
  447.  
  448.     You can add comment handling to the ARJ command by adding the
  449.     "-zcomment.txt" option.  This is supported at ARJ 2.20 and above.
  450.  
  451.  
  452.     LOG FILE DATA
  453.  
  454.     When logging is enabled, REARJ will log the action on each selected
  455.     file.  For successful conversions, REARJ logs the date-time, target
  456.     archive type, original archive size, new archive size, bytes saved,
  457.     and original archive name.
  458.  
  459.     When selected files are skipped for any reason, REARJ will log an
  460.     entry in the log file (when logging is enabled) which specifies the
  461.     reason code for skipping the file.  The following are the codes:
  462.  
  463.     1  = File not found
  464.     2  = File is not a configured archive type
  465.     3  = Target archive already exists
  466.     4  = Not enough disk space
  467.     5  = User skipped or user did not select update option
  468.     6  = UNPACK error
  469.     7  = PACK error
  470.     8  = Target cannot support directories
  471.     9  = Wrong file count
  472.     10 = Wrong total size
  473.     11 = Internal archive REARJ error
  474.     12 = Rename archive error
  475.     13 = Invoked /v command error (found a virus?)
  476.  
  477.  
  478.     LICENSE POLICY:
  479.  
  480.     For personal (not at the office) use, the shareware version of REARJ
  481.     may be freely used only by JAR or ARJ users.  An user is one who uses
  482.     ARJ or JAR on a regular basis.  Others who wish to use REARJ must
  483.     purchase a registration or site license for the ARJ or JAR package.
  484.  
  485.     Please refer to the LICENSE.DOC for more license information.
  486.  
  487.  
  488.     TECHNICAL SUPPORT:
  489.  
  490.     Please report any bugs.  I will TRY to fix them.  See JAR.DOC for
  491.     details on how to contact me.
  492.  
  493.  
  494.     HISTORY:
  495.  
  496.     2.30 - Created registered version of REARJ.
  497.  
  498.     2.25 - Added pathname requirement for VIRUS configuration option.
  499.  
  500.     2.24 - Fixed /f /d /u processing when updating an archive.
  501.  
  502.     2.23 - Fixed /z processing with /f option.
  503.      Added -jg+ to ARJ in REARJ.CFG
  504.  
  505.  
  506.     end document
  507.