home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / OS2 / RCOPY.ZIP / RCOPY.DOC < prev   
Text File  |  1994-02-01  |  14KB  |  335 lines

  1. RCOPY(c) Version 1.2  02/94  Dean. R. Ammons [73200,2513] All Rights Reserved
  2.  
  3.  
  4.    RCOPY is an extension of the OS/2 2.x COPY command.  With the available
  5.    options, a single RCOPY usage can perform tasks that would require
  6.    several OS/2 commands.  In addition to the parameter controlled
  7.    functions, RCOPY will:
  8.  
  9.       *  Displays progress messages.
  10.  
  11.       *  If the selected filename already exists in the target directory,
  12.          RCOPY will issue a warning pause, showing the size, time and date
  13.          of the current and new file.
  14.  
  15.       *  As a disk gets close to filling up, RCOPY will attempt to load the
  16.          smaller files until the smallest file remaining will not fit.
  17.  
  18.       *  When a disk does become full, RCOPY will pause to allow inserting
  19.          a new disk.
  20.  
  21.       *  Pressing any other key will pause processing.
  22.  
  23.       *  Unless overridden, a "Y/N" prompt will be issued before a new
  24.          directory is created.
  25.  
  26.  
  27.    RCOPY Parameters
  28.    ----------------
  29.  
  30.    RCOPY provides several optional command parameters to customize a
  31.    process.
  32.  
  33.       SYNTAX:  RCOPY from_spec [to_specs] [options]
  34.  
  35.    Entering a "?" at the end of the entered options will display a help
  36.    screen displaying the available parameters.  Any additional options
  37.    entered at the help prompt will be added to the startup options.
  38.  
  39.    [from] Enter the from_spec just like you would for the OS/2 Copy
  40.           command, including wildcard characters.  Unlike the OS/2 Copy,
  41.           RCOPY allows entering multiple from specs, each separated by a "+"
  42.           or comma (RCOPY *.EXE+*.COM A:\). Optionally, a file containing a
  43.           list of the from specs can be used.  The list of specifications
  44.           will be processed as if they were enter on the command line.  To
  45.           use this option, prefix the filename with the character "@"
  46.           (RCOPY @RCOPY.LST A:\).
  47.  
  48.    [to]   Enter the to_spec just like you would for the OS/2 Copy.  If
  49.           there is no to_spec, the current directory will be used.
  50.  
  51.           If the to_spec does not exist, RCOPY will prompt to determine if
  52.           it is a filename or directory.  To avoid this prompt, attach a
  53.           "\" to a new directory name or "." to a filename
  54.           (RCOPY *.* A:\NEWDIR\   RCOPY *.CMD A:\NEWFILE.)
  55.  
  56.  
  57.  
  58.    /A     Processes only files that have been marked updated by OS/2.
  59.  
  60.    /AD    Assume the to_spec is a directory if it does not exist.
  61.  
  62.    /AF    Assume the to_spec is a file if it does not exist.
  63.  
  64.    /AFX   If the to_spec does not exist and there is no extension, a new
  65.           directory is assumed.
  66.  
  67.    /AP    Append all the from_spec files to the end of the to_spec file.
  68.           (RCOPY FILE.A+FILE.B+FILE.C FILE.APP /AP)
  69.  
  70.    /AN    Assume a New Disk when the current disk becomes full.  The Bypass
  71.           and Split file options will not be available.
  72.  
  73.    /AS    Auto Split files when a disk becomes full and there is enough room
  74.           to do the split (bypassing initial "load disk" prompt).
  75.  
  76.    /B     After processing, remove the OS/2 update mark.
  77.  
  78.    /BO    Process only files that exist in both the from and to
  79.           directories.
  80.  
  81.    /D:)(=?
  82.           Select using the file date.  The selection criteria can be a date
  83.           (YYMMDD) or the number of days. The optional conditions are:
  84.  
  85.             ( - File date is older than requested.
  86.             ) - File date is newer than requested.
  87.             = - File date is equal to requested (default).
  88.  
  89.           Two /D: parameters can be used to select files between two dates.
  90.           To select all 1993 files, the parameter "/D:)921231/D:(940101"
  91.           would be used.  Files must meet BOTH conditions to be selected.
  92.           To select files that meet one OR the other condition, include the
  93.           parameter "/DO".
  94.  
  95.    /DF    Delete all files on the to_spec drive before processing.
  96.  
  97.    /DF2   If multiple output disks are required, delete all files starting
  98.           with disk #2.  Files will be added to the first disk without
  99.           deleting.
  100.  
  101.    /DC    Create duplicate directory on the to_spec disk for every directory
  102.           processed on the from_spec disk without prompting.
  103.  
  104.              * RCOPY C:\OS2\*.* A:\ /DC would create A:\OS2
  105.              * RCOPY C:\OS2\*.* A:\TEMP would create A:\TEMP\OS2
  106.  
  107.    /DEL   The from_spec files will be DELETED instead of copied or moved.
  108.           For example, to delete all files with an .BAK extension on the C:
  109.           drive:   RCOPY C:\*.BAK /DEL/S
  110.  
  111.    /DD:?  Drop the first "?" levels of the to_specs directory tree.
  112.  
  113.              RCOPY C:\OS2\SYSTEM D:\ /DC/DD:1
  114.                Copy all the files from C:\OS2\SYSTEM to D:\OS2
  115.              RCOPY C:\OS2\SYSTEM D:\ /DC/DD:2
  116.                Copy all the files from C:\OS2\SYSTEM to D:\
  117.  
  118.           Prefixing the level number with '-' will cause the first '?'
  119.           levels of the from_specs dirctory to be dropped.
  120.  
  121.                Copy all the files from C:\OS2\SYSTEM to D:\SYSTEM
  122.  
  123.    /DR:?  Repeat the same process for "?" drives.
  124.  
  125.    /DO    When two /D:, /T: or /SZ: parameters are used, invoke the "OR"
  126.           condition instead of "AND".
  127.  
  128.    /ED    Delete all the files in the to_specs directories before
  129.           processing from_spec files.
  130.  
  131.    /FA    Format all output each destination diskette before processing.
  132.  
  133.    /H     Allows processing both HIDDEN and SYSTEM files.
  134.  
  135.    /IP:pathname
  136.           Process only files that exists in PATHNAME.
  137.  
  138.             RCOPY C:\*.* \TEMP /IP:\OS2\SYSTEM /S
  139.             Copy all files on "C" drive to \TEMP only if each file already
  140.             exists in \OS2\SYSTEM
  141.  
  142.    /IP-:pathname
  143.           Process only files that DO NOT exists in PATHNAME.
  144.  
  145.    /L     List files that meet selection criteria - NO processing occurs.
  146.  
  147.    /LG    Processing activities will be appended to the end of the file
  148.           RCOPY.LOG in the same directory where RCOPY.CMD is stored. To
  149.           create RCOPY.LOG in a different location, use /LG:<location> or
  150.           /LG:<location><new log file name>. Prefixing <location> with "@"
  151.           will cause RCOPY to create a new log file each time.
  152.  
  153.    /M     Move the selected from_spec files to the to_specs location.
  154.           Default is copy.
  155.  
  156.    /MU    Process multiple input disks.  To define how many input
  157.           diskettes, use /MU:nn.
  158.  
  159.    /N     Process only those files that do not already exist on the to_spec
  160.           directory.
  161.  
  162.    /NS    Suppress "beeps" issued at various prompts.
  163.  
  164.    /NT    Do not display totals when processing terminates.
  165.  
  166.    /OD:?  Specify a list of directories that are to be bypassed during
  167.           processing (RCOPY *.* C:\ /OD:\OS2,\MUGLIB).  All sub-directories
  168.           belonging to the requested directory will also be bypassed.  A
  169.           filename listing the directories can also be used by prefixing
  170.           with "@" (RCOPY *.* C:\ /OD:@DIR.LST). To bypass just the first
  171.           directory of a tree, attach a '\' to the directory name (RCOPY
  172.           *.* C:\ /OD:\OS2\,\MUGLIB).
  173.  
  174.    /OF:?  Specify a list of filenames or patterns to be bypassed during
  175.           processing (RCOPY *.* C:\ /OF:*.BAK,*.ZIP,*.$*).  A filename
  176.           listing the specs can also be used by prefixing with "@" (RCOPY
  177.           *.* C:\ /OF:@FILE.LST).
  178.  
  179.    /P     Pause before each file is processed.
  180.  
  181.    /PE    Pause at the end of processing.  Useful when executing RCOPY from
  182.           a window that closes on exit. To control the length of the pause,
  183.           enter /PEx, where "x" is the number of seconds to pause.
  184.  
  185.    /PGM:xxx
  186.           Execute the command "xxx" against all the selected files. When this
  187.           option is invoked, RCOPY will not copy, move or delete the selected
  188.           files. Multiple /PGM: options can be requested.
  189.  
  190.              $   Replaced with the full filenames of each selected file.
  191.              #   Replace with filename of each selected file (no path).
  192.              ]   Replaced with '/'.
  193.              {   Replaced with directory of file selected for processing.
  194.              %   Replaced with drive of file selected for processing
  195.              )   Replaced with '>'
  196.              (   Replaced with '<'
  197.              !   Replaced with '|'
  198.  
  199.           The following example shows how to print then zip every file on the
  200.           C: drive with a ".DOC" extension.
  201.  
  202.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  203.  
  204.           If a command is prefixed with "-", the commands will be written
  205.           to PGM.CMD instead of being executed.
  206.  
  207.              RCOPY C:\*.DOC /S/PGM:-PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  208.  
  209.           RCOPY defaults to passing ALL the selected files to the "/PGM:"
  210.           program.  To limit the number of files passed use the option
  211.           "/PGMn:", where "n" is the number of files to pass. For example, to
  212.           pass 30 selected files to PKZIP2 and one to PRINT per execution:
  213.  
  214.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM30:PKZIP2 -U ZIPFILE $ )NUL
  215.  
  216.    /R     Replace duplicate files without prompting.
  217.  
  218.    /RD    Reset date of processed files to current date.
  219.  
  220.    /RE    Remove empty directories after MOVE process.
  221.  
  222.    /RO    Allow MOVING or DELETING Read-Only Files.  Copying Read-Only
  223.           files will always work.
  224.  
  225.    /S     Process all from_spec sub-directories.
  226.  
  227.    /SA    Instead of replacing a file, rename it by changing the last to
  228.           positions of the file's extension to "01" to "99".
  229.  
  230.    /SD    The progress display shows only the files processed and the final
  231.           totals.
  232.  
  233.    /SD2   The progress display shows only the files processed.
  234.  
  235.    /SE    Skip files that are EXACT duplicates.
  236.  
  237.    /SF:nnn
  238.           Splits the selected files into sub-files of "nnn" kilobytes
  239.           (kbyte=1024 bytes).  The sub-files are named filename.001,
  240.           filname.002, etc and will be stored in the copy-to directory.
  241.  
  242.    /ST:?  Reserve "?" amount of freespace on the to_specs drive.  Once the
  243.           minimum is reached, RCOPY will issue the load-next-disk prompt.
  244.  
  245.    /SZ:)(=?
  246.  
  247.           Select a file based on its size. Same rules as /D:
  248.  
  249.    /T     Test mode.  No actual processing takes place, but normal
  250.           processing messages are still issued
  251.  
  252.    /T:)(=?
  253.           Select a file based on its file time. Same rules as /D:
  254.  
  255.    /U     Process only files that either do not exist in the to_specs
  256.           directory or are newer than those that do exist.
  257.  
  258.    /US    Unsplits, or joins, the multiple files created using the "/SF:"
  259.           option.  For example, "RCOPY MYFILE.ZIP /US" will join the files
  260.           MYFILE.001, MYFILE.002, ... into the file MYFILE.ZIP. The join file
  261.           will be stored in the copy-to directory.  If the split files are
  262.           stored on multiple diskettes, use the "/MU" option (diskettes must
  263.           be processed in correct sequence).
  264.  
  265.    /V     Verify a process using the OS/2 verify option.
  266.  
  267.    /WA    Pause RCOPY's initial processing and prompt for a diskette.
  268.  
  269.    /WY    Display the files that were skipped and tell why.
  270.  
  271.    RCOPY Return Codes
  272.    ------------------
  273.  
  274.    RCOPY returns five values.
  275.  
  276.       1)  Return code "0" if process completed successfully or "1" if not
  277.       2)  Number of files copied/moved/deleted, depending on option used. If
  278.           the /SF: option is used, this will be the number of split files
  279.           created.  If the /US options is used, this will be the number of
  280.           joined files created.
  281.       3)  Number of input disks processed
  282.       4)  Number of files processed, including those skipped or bypassed
  283.       5)  Number of bytes copied/moved/deleted
  284.  
  285.    The syntax to capture these values:
  286.  
  287.     parse value RCOPY(specs) with ret_cd copied nbr_disks processed bytes .
  288.  
  289.    The following parameters are available for passing the values in 2-5
  290.    from one execution of RCOPY to another.
  291.  
  292.      /#ND:n  - Number Disks
  293.      /#FC:n  - Files copied
  294.      /#FP:n  - Files processed
  295.      /#BC:n  - Bytes copied
  296.  
  297.    When these values are passed to RCOPY, they are included in final totals.
  298.    (useful when command file does multiple RCOPYs with different options).
  299.  
  300.  
  301. Example of RCOPY Uses
  302. ---------------------
  303.  
  304. 1)  Move all the files on the A: drive to the appropriate sub-directories on
  305.     the C: drive, replacing files that already exists and removing the
  306.     directories from A:.
  307.  
  308.       call RCOPY 'A:\*.* C:\ /S/DC/M/RE'
  309.  
  310. 2)  Copy all the files on the C: drive to the appropriate sub-directories on
  311.     the A: drive that were updated today, bypassing directories listed in the
  312.     file RCOPY.OD and bypassing the filespecs in the file RCOPY.OF.
  313.  
  314.       call RCOPY 'C:\*.* A:\ /S/DC/V/OD:@C:\RCOPY.OD/OF:@C:\RCOPY.OF/D:)1'
  315.  
  316. 3)  The following is an example of multiple RCOPY runs, with each execution
  317.     using the statistics from the previous run (10,000 bytes is reserved for
  318.     the file INSTALL.CMD).
  319.  
  320.       /* */
  321.       parse value RCOPY('*.ZIP+*.CMD A:\ /AN/SD2/NT/DF/ST:10000) with
  322.         retcd copied nbrdisks processed bytes  .
  323.       if retcd<>0 then
  324.          EXIT
  325.       .....
  326.         Code to create INSTALL.CMD
  327.       .....
  328.       if nbrdisks>1 then
  329.          do
  330.            say 'Please Re-Insert Disk #1'
  331.            pause
  332.          end
  333.       call RCOPY 'INSTALL.CMD A:\ /SD/V/#FC:'||copied||'/#FP:'||processed||
  334.         '/#ND:1/#BC:'||bytes
  335.