home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / a / arj239d.zip / REARJ.DOC < prev    next >
Text File  |  1993-03-05  |  20KB  |  504 lines

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