home *** CD-ROM | disk | FTP | other *** search
/ What the Doctor Required - The Freshest December / December.iso / archivat / arj.all / arj255c.exe / REARJ.DOC < prev    next >
Text File  |  1997-05-08  |  23KB  |  526 lines

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