home *** CD-ROM | disk | FTP | other *** search
/ The Original Shareware 1992 / TheOrigSharewareV1.cdr / 25 / arj200.exe / arj / REARJ.DOC < prev    next >
Text File  |  1991-04-10  |  17KB  |  441 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.      User's Manual for the REARJ archive conversion program,   April 1991
  7.  
  8.  
  9.  
  10.         REARJ software and manual copyright (c) 1991 by Robert K Jung.
  11.         All rights reserved.
  12.  
  13.         REARJ version 1.20 release
  14.  
  15.  
  16.  
  17.  
  18.      INTRODUCTION:
  19.  
  20.      REARJ is an archive conversion program designed to facilitate the
  21.      conversion of LZH, ZIP, PAK, ARC, DWC, HYP, LZS, and ZOO archives to
  22.      the ARJ format.  In addition, this converter has been designed to
  23.      convert to any of the aforementioned archive formats.
  24.  
  25.  
  26.      MAJOR FEATURES:
  27.  
  28.      REARJ supports all major archiver programs (PAK, LHARC, PKZIP, ZOO,
  29.      ARJ, PKPAK, DWC, HYPER, LARC, LHA).
  30.  
  31.      REARJ supports file attributes within archives.
  32.  
  33.      REARJ supports directories within archives.
  34.  
  35.      REARJ supports converting archives within archives (ZIPs in a ZIP).
  36.  
  37.      REARJ ensures reliable archive conversion with a file count and total
  38.      size check.
  39.  
  40.      REARJ supports pathnames with drive letters.
  41.  
  42.      REARJ is command line driven.
  43.  
  44.      REARJ supports recursive scanning through subdirectories.
  45.  
  46.      Optional logging of conversions.
  47.  
  48.      Simulation option.
  49.  
  50.  
  51.      A WORD OF CAUTION:
  52.  
  53.      If you plan to convert many archives at one time, it is STRONGLY
  54.      suggested that you make a backup of your hard disk.  This is a wise
  55.      precaution to take anytime that you make major modifications to data
  56.      on your hard disk drive.
  57.  
  58.      REARJ will not work properly for those archivers/archives that produce
  59.      absolute directory paths when extracting.  In other words, REARJ
  60.      expects to find all extracted data in its created temporary directory.
  61.  
  62.      If you have changed the MS-DOS switch character from "/" to another
  63.      character via an undocumented MS-DOS interrupt or the TurboC
  64.      setswitchar() function, REARJ may not work properly with the default
  65.      REARJ.CFG configuration file.
  66.  
  67.      The most thorough testing was done with ARJ as the target format and
  68.      ZIP as the original format.  In any case, you should verify that the
  69.      extract commands of your favorite archive formats in the configuration
  70.      file are correct.  The extract commands are the most important to get
  71.      right because REARJ has a built-in verification procedure to ensure
  72.      that the ADD command executed properly.
  73.  
  74.      Be sure you have enough disk space on your working directory to
  75.      extract the largest archive that you want to convert!!!
  76.  
  77.  
  78.      The versions of archivers tested:
  79.  
  80.      ARJ   1.00, 1.10, 2.00
  81.      LHA   2.12
  82.      PAK   2.51
  83.      PKZIP 1.10
  84.      PKPAK 3.61
  85.      ZOO   2.01
  86.      DWC   A5.01
  87.      LARC  3.33
  88.      HYPER 2.5
  89.  
  90.  
  91.      INSTALLATION:
  92.  
  93.      Copy REARJ.EXE and REARJ.CFG to one of the PATH directories.  They do
  94.      not have to be placed in the same directory.  The PATH directories are
  95.      usually set by the PATH command in your AUTOEXEC.BAT file.
  96.  
  97.  
  98.      OPERATION OF REARJ:
  99.  
  100.      REARJ will build a temporary directory in the current directory and
  101.      extract the archive(s) to this directory.  REARJ will then build the
  102.      target archive(s) with the files in this directory.  If the target
  103.      archiver does not support reading of hidden or system files, REARJ
  104.      will reset those bits and then re-archive the files without those
  105.      attributes.  If the original archive has directories in it, REARJ will
  106.      extract it with full paths and re-archive it with full paths if the
  107.      target archiver supports directories.  In this case, if the archiver
  108.      does not support directories, REARJ will skip converting this archive.
  109.  
  110.      If the "/a" option has been selected, REARJ will execute REARJ to
  111.      convert any internal archives of the same type to the target format.
  112.      Any "/s" option will be carried over to the recursive REARJ command.
  113.  
  114.      As an extra test, REARJ will count the files extracted from the
  115.      original archive and total their sizes.  Then REARJ will extract the
  116.      new archive and count the files and total the sizes.  If the count and
  117.      size do not match, REARJ will skip converting the archive.
  118.  
  119.      REARJ assumes that the supported archivers will pass a non-zero error
  120.      code when there is an operation failure.
  121.  
  122.  
  123.      COMMAND SYNTAX:
  124.  
  125.      REARJ [switch options] filespec(s) or wildspec(s)
  126.  
  127.      You can specify one or more filespecs on the command line.  These
  128.      filespecs can have paths and wildcards.  Up to 100 filespecs can be
  129.      accepted by REARJ.  If you specify *.* as a wildspec, REARJ will look
  130.      at all filenames, but will skip those filenames not ending in standard
  131.      archive suffixes.  If you specify the /r switch, REARJ will look for
  132.      filenames matching the filespec(s) in the current directory and all
  133.      subdirectories of the current directory.
  134.  
  135.      If you want to use a RAMDRIVE as the temporary directory, you must
  136.      make the RAMDRIVE the current drive and directory and execute REARJ
  137.      commands from there.
  138.  
  139.      The switch options and filespecs can be entered in any order. REARJ
  140.      uses the default MS-DOS switch character "/".  REARJ uses the Turbo
  141.      C++ function getswitchar() to determine the MS-DOS switch character.
  142.      If the switch character is "-", REARJ will translate any UNIX style
  143.      pathnames to MS-DOS syntax ("dir/file" to "dir\file").
  144.  
  145.  
  146.      SWITCH OPTIONS:
  147.  
  148.      /a - convert archives within archives
  149.  
  150.           This option causes ARJ to recursively execute REARJ to convert
  151.           any archives of the original type found within the original
  152.           archive (ex. ZIPs within a ZIP).  This option requires additional
  153.           memory to execute successfully.
  154.  
  155.           NOTE!!!  When using this option, REARJ.EXE and REARJ.CFG must be
  156.           installed in a DOS PATH directory because the recursive REARJ
  157.           will be executed within a temporary directory and NOT in the
  158.           original directory.
  159.  
  160.      /d - delete the original archive
  161.  
  162.           This option causes REARJ to delete the original archive after a
  163.           successful conversion to the target format.  This option will NOT
  164.           delete read-only archives.
  165.  
  166.      /e - do not return error if no archives were found
  167.  
  168.           This option is used by the internal recursive REARJ.  This option
  169.           will cause REARJ to return a zero exit code if no matching
  170.           archives were found.  Usually, REARJ returns a non-zero exit
  171.           code for this condition.
  172.  
  173.      /i - check program integrity
  174.  
  175.           This option causes REARJ to validate the REARJ program on disk.
  176.           If you are using a pre-3.0 MS-DOS revision, you will have to
  177.           specify the full program name as in "REARJ /i\util\rearj.exe".
  178.  
  179.      /l - write conversion data to log file
  180.  
  181.           This option causes REARJ to open a log file and record each
  182.           successful conversion in the log file.  The default log file name
  183.           is REARJ.LOG.  You can specify the log file name as in
  184.           "REARJ /lfilename *.ZIP".  If the log file already exists, REARJ
  185.           will append logging data to it.
  186.  
  187.      /o - overwrite existing target archive
  188.  
  189.           This switch is used to delete already existing target archives.
  190.           This is not used for updating archives.  Use the /u option for
  191.           updating an archive.
  192.  
  193.      /q - query for each archive to convert
  194.  
  195.           This switch causes REARJ to pause and prompt the user for
  196.           permission to convert individual archives.  Note that REARJ will
  197.           not prompt when skipping archives.
  198.  
  199.      /r - recurse through subdirectories
  200.  
  201.           This switch causes REARJ to look for archives in all included
  202.           subdirectories as well as in the current directory.  This switch
  203.           allows the user to convert all archives on a hard disk with one
  204.           command.
  205.  
  206.      /s - skip verify of file count and total size
  207.  
  208.           Skip the overhead of the file count and total size verification
  209.           process.  This verification costs an extra extraction, but this
  210.           check is worth the time, especially when converting a large
  211.           number of archives.
  212.  
  213.      /t - specify the target archive type
  214.  
  215.           The default target archive format is normally ARJ.  This can be
  216.           changed by building an external REARJ.CFG file.  The first
  217.           archive type is always the default format.  To override the
  218.           default format, the user can specify the /t switch as in
  219.           "REARJ *.ZIP /tlzh".  The previous example has specified that LZH
  220.           is the target format.
  221.  
  222.      /u - allow update of archive with backup
  223.  
  224.           This switch is used to re-archive an archive, possibly to take
  225.           advantage of improved compression.  The original archive is
  226.           backed up by renaming it with the backup suffix which by default
  227.           is "BAK".  You may specify another backup suffix with the /u
  228.           option as in "REARJ *.ARJ /uar$" where the backup suffix is
  229.           "ar$".  Since this option creates a brand new archive, archive
  230.           comments will be lost.
  231.    
  232.      /x - exclude filenames or wildnames from the conversion process
  233.  
  234.           You can exclude one or more files from the conversion process.
  235.           The filenames can contain wildcards.
  236.  
  237.           REARJ *.ZIP /xONE.ZIP /xTWO.ZIP
  238.  
  239.      /z - simulate conversion process
  240.  
  241.           This switch causes REARJ to simulate the conversion process.  No
  242.           archives will be extracted, built, or deleted.
  243.  
  244.  
  245.      EXAMPLES:
  246.  
  247.      REARJ *.ZIP                this converts all ZIP files in the current
  248.                                 directory to ARJ files.
  249.  
  250.      REARJ *.ZIP *.ARC          this converts ZIP and ARC files to ARJ files.
  251.  
  252.      REARJ SOFT.ZIP             this converts only SOFT.ZIP to SOFT.ARJ.
  253.  
  254.      REARJ *.ZIP /d /l          this converts ZIP files with logging and
  255.                                 deletion of each original archive upon
  256.                                 successful conversion.
  257.  
  258.      REARJ *.ARC /r             this converts all ARC files in the current
  259.                                 directory and in subdirectories of the
  260.                                 current directory to ARJ files.
  261.  
  262.      REARJ SOFT.ARJ /tZIP       this converts SOFT.ARJ to SOFT.ZIP.
  263.  
  264.      REARJ *.ARJ /u             re-archive all ARJ archives
  265.  
  266.  
  267.      EXTERNAL CONFIGURATION FILE
  268.  
  269.      REARJ comes with a configuration file, REARJ.CFG, which supports
  270.      conversion between the ARJ, ARC, LZH, PAK, ZIP, DWC, LZS, HYP, and ZOO
  271.      formats.  The commands PKPAK and PKUNPAK are used for ARC files.  The
  272.      command LHA is used for LZH files.  You can change these defaults by
  273.      editing the configuration file.
  274.  
  275.      The format of the configuration file is fairly simple.  Each format
  276.      requires four lines in the file.
  277.  
  278.      The first line is the format suffix.
  279.  
  280.      The second line is the archive ADD command with a %s in the place of
  281.      the archive name.  Any other percent signs in the command must be
  282.      preceded by "\" as in "\%".  The ADD command should support directory
  283.      inclusion and reading of hidden and/or system files.  REARJ will parse
  284.      this command line using the space character as the token separator.
  285.  
  286.      If your ADD command requires DOS piping as the ZOO archiver requires,
  287.      you must precede the ADD command with the text "COMMAND /C ".
  288.  
  289.      Example:  ARJ a -a -r -jt %s
  290.                COMMAND /C STUFF *.* | ZOO aI %s
  291.  
  292.      The third line is the archive EXTRACT command with a %s in the
  293.      place of the archive name.  Any other percent signs in the command
  294.      must be preceded by "\" as in "\%".  The EXTRACT command should
  295.      support directory recreation if the archive contains directories.
  296.      The extraction of directories must be to child directories within the
  297.      current directory.  REARJ will parse this command line using the space
  298.      character as the token separator.
  299.  
  300.      If your EXTRACT command requires DOS piping, you must precede the
  301.      EXTRACT command with the text "COMMAND /C ".  Beware that command exit
  302.      codes are not passed back to REARJ when using COMMAND /C.
  303.  
  304.      The fourth line contains the letters "A" and/or "D" or no letters.
  305.      The "A" stands for the ability to process files with the hidden and/or
  306.      system attribute.  The "D" stands for full support of directory trees
  307.      within archives.  No letters (blank line) stands for no support for
  308.      hidden or system files or for archive containing directories.
  309.  
  310.      There must be NO EXTRA blank lines or comments in the file.  You may
  311.      use leading blanks for clarity.
  312.  
  313.      The first format type declared in the configuration file is used by
  314.      REARJ as its default target format.   REARJ.CFG is currently setup
  315.      with ARJ as its default target format.
  316.  
  317.      The following is the current REARJ.CFG configuration:
  318.  
  319.      ARJ
  320.       ARJ a -a+ -r+ -y+ -jt+ %s
  321.       ARJ x -y+ %s
  322.       AD
  323.      ZIP
  324.       PKZIP -a -r -p -wHS %s
  325.       PKUNZIP -d %s
  326.       AD
  327.      ARC
  328.       PKPAK -a %s
  329.       PKUNPAK %s
  330.  
  331.      LZH
  332.       LHA a /a+ /r+ /x+ %s
  333.       LHA x /a+ %s
  334.       AD
  335.      PAK
  336.       PAK a /i %s
  337.       PAK e /path %s
  338.       AD
  339.      ZOO
  340.       COMMAND /C STUFF *.* | ZOO aI %s
  341.       ZOO x.// %s *
  342.       D
  343.      HYP
  344.       HYPER -a -r -p %s
  345.       HYPER -x -p %s .
  346.       AD
  347.      DWC
  348.       DWC a %s *.*
  349.       DWC e %s
  350.  
  351.      LZS
  352.       LARC a /r %s *.*
  353.       LARC e /x %s *.*
  354.       D
  355.  
  356.      If you use a different archiver program, you will need to either
  357.      rename the program to one of the supported ones or you will need to
  358.      modify the installed REARJ.CFG file.
  359.  
  360.      DWC does not allow duplicate filenames even within a directory
  361.      structure, so "D" is not set for DWC.
  362.  
  363.      LARC may or may not work correctly for archives with directories.  I
  364.      was unable to stop LARC from querying on making directories.
  365.  
  366.      If your original archive format supports extraction to absolute
  367.      directory paths as opposed to relative directory paths and you have
  368.      such archives containing absolute paths, you should not put directory
  369.      extraction in the REARJ.CFG file.
  370.  
  371.  
  372.      LOG FILE DATA
  373.  
  374.      When logging is enabled, REARJ will log the action on each selected
  375.      file.  For successful conversions, REARJ logs the date-time, target
  376.      archive type, original archive size, new archive size, bytes saved,
  377.      and original archive name.
  378.  
  379.      When selected files are skipped for any reason, REARJ will log an
  380.      entry in the log file (when logging is enabled) which specifies the
  381.      reason code for skipping the file.  The following are the codes:
  382.  
  383.      1  = File not found
  384.      2  = File is not a configured archive type
  385.      3  = Target archive already exists
  386.      4  = Not enough disk space       (currently unimplemented)
  387.      5  = User skipped or user did not select update option
  388.      6  = UNPACK error
  389.      7  = PACK error
  390.      8  = Target cannot support directories
  391.      9  = Wrong file count
  392.      10 = Wrong total size
  393.      11 = Internal archive REARJ error
  394.      12 = Rename archive error
  395.  
  396.      
  397.      Below is the REARJ built-in help screen:
  398.  
  399.      REARJ 1.20 Copyright (c) 1991 Robert K Jung, All rights reserved.
  400.      Free for non-commercial personal use for ARJ users.  April 10 1991
  401.  
  402.      Usage:  REARJ [switch options] <filespec(s) or wildname(s)>
  403.        Switch options: (can be placed before or after filespecs)
  404.        /a        convert archives within archives
  405.        /d        delete original archives
  406.        /i[name]  check integrity of REARJ.EXE
  407.        /l[name]  write append log file (default name is REARJ.LOG)
  408.        /o        allow overwrite of existing target archive
  409.        /q        query for each archive to convert
  410.        /r        recurse through subdirectories
  411.        /s        skip verify of file count and total size
  412.        /tsuffix  create suffix type archives
  413.        /u[bak]   allow update of archive with backup (default is BAK)
  414.        /xfile    exclude file or wildname
  415.        /z        simulate operation
  416.      Examples:
  417.        REARJ *.arj run.lzh /tzip  Convert ARJ files and run.lzh to ZIP format
  418.        REARJ *.* /r /d            Convert all archives to ARJ format, searching
  419.                                   all subdirectories, deleting original archives
  420.      If you find REARJ of value, a gift of 10 dollars or any amount would be
  421.      greatly appreciated.  2606 Village Road West, Norwood, Massachusetts 02062
  422.  
  423.  
  424.      LICENSE POLICY:
  425.  
  426.      REARJ has an unusual license policy.
  427.      Please refer to the LICENSE.DOC for license information.
  428.  
  429.  
  430.      HISTORY:
  431.  
  432.      1.20 - Fixed path processing with drive letters.  Fixed alternate drive
  433.             processing.  Removed disk space checking.
  434.  
  435.             Fixed REARJ.CFG for LZH and HYP archives.
  436.             Added /u option.  Changed /o option.
  437.  
  438.         
  439.      end document
  440.  
  441.