home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac_os2 / rcopy.zip / RCOPY.DOC < prev   
Text File  |  1994-07-26  |  14KB  |  350 lines

  1. RCOPY(c) Version 1.6  07/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. For example, "/DR:CFG"
  124.           would process the requested file specs on drives "C", "F" and "G"
  125.           only.
  126.  
  127.    /DO    When two /D:, /T: or /SZ: parameters are used, invoke the "OR"
  128.           condition instead of "AND".
  129.  
  130.    /ED    Delete all the files in the to_specs directories before
  131.           processing from_spec files.
  132.  
  133.    /FA    Format all output each destination diskette before processing.
  134.  
  135.    /FA2   If multiple output disks are required, only format starting with
  136.           disk #2.  Files will be added to the first disk without
  137.           formatting.
  138.  
  139.    /H     Allows processing both HIDDEN and SYSTEM files.
  140.  
  141.    /IP:pathname
  142.           Process only files that exists in PATHNAME.
  143.  
  144.             RCOPY C:\*.* \TEMP /IP:\OS2\SYSTEM /S
  145.             Copy all files on "C" drive to \TEMP only if each file already
  146.             exists in \OS2\SYSTEM
  147.  
  148.    /IP-:pathname
  149.           Process only files that DO NOT exists in PATHNAME.
  150.  
  151.    /L     List files that meet selection criteria - NO processing occurs.
  152.  
  153.    /LG    Processing activities will be appended to the end of the file
  154.           RCOPY.LOG in the same directory where RCOPY.CMD is stored. To
  155.           create RCOPY.LOG in a different location, use /LG:<location> or
  156.           /LG:<location><new log file name>. Prefixing <location> with "@"
  157.           will cause RCOPY to create a new log file each time. Prefixing
  158.           <location> with "!" will create a new LIST file. In this case,
  159.           the file will only contain a list of the processed files.  The
  160.           file can then be used as input to other programs, including RCOPY
  161.           (when prefixed with "@").
  162.  
  163.    /M     Move the selected from_spec files to the to_specs location.
  164.           Default is copy.
  165.  
  166.    /MU    Process multiple input disks.  To define how many input
  167.           diskettes, use /MU:nn.
  168.  
  169.    /N     Process only those files that do not already exist on the to_spec
  170.           directory.
  171.  
  172.    /NC    No COPY or MOVE function performed when /PGM option is used. Only
  173.           required if a target directory is requested. Useful when using
  174.           the "/BO" or "/N" options to feed selected files to a "/PGM"
  175.           function.
  176.  
  177.    /NS    Suppress "beeps" issued at various prompts.
  178.  
  179.    /NT    Do not display totals when processing terminates.
  180.  
  181.    /OD:?  Specify a list of directories that are to be bypassed during
  182.           processing (RCOPY *.* C:\ /OD:\OS2,\MUGLIB).  All sub-directories
  183.           belonging to the requested directory will also be bypassed.  A
  184.           filename listing the directories can also be used by prefixing
  185.           with "@" (RCOPY *.* C:\ /OD:@DIR.LST). To bypass just the first
  186.           directory of a tree, attach a '\' to the directory name (RCOPY
  187.           *.* C:\ /OD:\OS2\,\MUGLIB).
  188.  
  189.    /OF:?  Specify a list of filenames or patterns to be bypassed during
  190.           processing (RCOPY *.* C:\ /OF:*.BAK,*.ZIP,*.$*).  A filename
  191.           listing the specs can also be used by prefixing with "@" (RCOPY
  192.           *.* C:\ /OF:@FILE.LST).
  193.  
  194.    /P     Pause before each file is processed.
  195.  
  196.    /PE    Pause at the end of processing.  Useful when executing RCOPY from
  197.           a window that closes on exit. To control the length of the pause,
  198.           enter /PEx, where "x" is the number of seconds to pause.
  199.  
  200.    /PGM:xxx
  201.           Execute the command "xxx" against all the selected files. To also
  202.           do a COPY or MOVE before executing the program, a TO directory
  203.           must be included. Multiple /PGM: options can be requested.
  204.  
  205.              $   Replaced with the full filenames of each selected file.
  206.              #   Replace with filename of each selected file (no path).
  207.              ]   Replaced with '/'.
  208.              {   Replaced with directory of file selected for processing.
  209.              %   Replaced with drive of file selected for processing
  210.              )   Replaced with '>'
  211.              (   Replaced with '<'
  212.              !   Replaced with '|'
  213.  
  214.           The following example shows how to print then zip every file on the
  215.           C: drive with a ".DOC" extension.
  216.  
  217.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  218.  
  219.           If a command is prefixed with "-", the commands will be written
  220.           to PGM.CMD instead of being executed.
  221.  
  222.              RCOPY C:\*.DOC /S/PGM:-PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
  223.  
  224.           RCOPY defaults to passing ALL the selected files to the "/PGM:"
  225.           program.  To limit the number of files passed use the option
  226.           "/PGMn:", where "n" is the number of files to pass. For example, to
  227.           pass 30 selected files to PKZIP2 and one to PRINT per execution:
  228.  
  229.              RCOPY C:\*.DOC /S/PGM:PRINT/PGM30:PKZIP2 -U ZIPFILE $ )NUL
  230.  
  231.    /R     Replace duplicate files without prompting.
  232.  
  233.    /RD    Reset date of processed files to current date.
  234.  
  235.    /RE    Remove empty directories after MOVE process.
  236.  
  237.    /RO    Allow MOVING, REPLACING or DELETING Read-Only Files.  Copying
  238.           Read-Only files will always work.
  239.  
  240.    /S     Process all from_spec sub-directories.
  241.  
  242.    /SA    Instead of replacing a file, rename it by changing the last to
  243.           positions of the file's extension to "01" to "99".
  244.  
  245.    /SD    The progress display shows only the files processed and the final
  246.           totals.
  247.  
  248.    /SD2   The progress display shows only the files processed.
  249.  
  250.    /SE    Skip files that are EXACT duplicates.
  251.  
  252.    /SF:nnn
  253.           Splits the selected files into sub-files of "nnn" kilobytes
  254.           (kbyte=1024 bytes).  The sub-files are named filename.001,
  255.           filname.002, etc and will be stored in the copy-to directory.
  256.  
  257.    /ST:?  Reserve "?" amount of freespace on the to_specs drive.  Once the
  258.           minimum is reached, RCOPY will issue the load-next-disk prompt.
  259.  
  260.    /SZ:)(=?
  261.  
  262.           Select a file based on its size. Same rules as /D:
  263.  
  264.    /T     Test mode.  No actual processing takes place, but normal
  265.           processing messages are still issued
  266.  
  267.    /T:)(=?
  268.           Select a file based on its file time. Same rules as /D:
  269.  
  270.    /U     Process only files that either do not exist in the to_specs
  271.           directory or are newer than those that do exist.
  272.  
  273.    /US    Unsplits, or joins, the multiple files created using the "/SF:"
  274.           option.  For example, "RCOPY MYFILE.ZIP /US" will join the files
  275.           MYFILE.001, MYFILE.002, ... into the file MYFILE.ZIP. The join file
  276.           will be stored in the copy-to directory.  If the split files are
  277.           stored on multiple diskettes, use the "/MU" option (diskettes must
  278.           be processed in correct sequence).
  279.  
  280.    /V     Verify a process using the OS/2 verify option.
  281.  
  282.    /WA    Pause RCOPY's initial processing and prompt for a diskette.
  283.  
  284.    /WY    Display the files that were skipped and tell why.
  285.  
  286.    RCOPY Return Codes
  287.    ------------------
  288.  
  289.    RCOPY returns five values.
  290.  
  291.       1)  Return code "0" if process completed successfully or "1" if not
  292.       2)  Number of files copied/moved/deleted, depending on option used. If
  293.           the /SF: option is used, this will be the number of split files
  294.           created.  If the /US options is used, this will be the number of
  295.           joined files created.
  296.       3)  Number of input disks processed
  297.       4)  Number of files processed, including those skipped or bypassed
  298.       5)  Number of bytes copied/moved/deleted
  299.  
  300.    The syntax to capture these values:
  301.  
  302.     parse value RCOPY(specs) with ret_cd copied nbr_disks processed bytes .
  303.  
  304.    The following parameters are available for passing the values in 2-5
  305.    from one execution of RCOPY to another.
  306.  
  307.      /#ND:n  - Number Disks
  308.      /#FC:n  - Files copied
  309.      /#FP:n  - Files processed
  310.      /#BC:n  - Bytes copied
  311.  
  312.    When these values are passed to RCOPY, they are included in final totals.
  313.    (useful when command file does multiple RCOPYs with different options).
  314.  
  315.  
  316. Example of RCOPY Uses
  317. ---------------------
  318.  
  319. 1)  Move all the files on the A: drive to the appropriate sub-directories on
  320.     the C: drive, replacing files that already exists and removing the
  321.     directories from A:.
  322.  
  323.       call RCOPY 'A:\*.* C:\ /S/DC/M/RE'
  324.  
  325. 2)  Copy all the files on the C: drive to the appropriate sub-directories on
  326.     the A: drive that were updated today, bypassing directories listed in the
  327.     file RCOPY.OD and bypassing the filespecs in the file RCOPY.OF.
  328.  
  329.       call RCOPY 'C:\*.* A:\ /S/DC/V/OD:@C:\RCOPY.OD/OF:@C:\RCOPY.OF/D:)1'
  330.  
  331. 3)  The following is an example of multiple RCOPY runs, with each execution
  332.     using the statistics from the previous run (10,000 bytes is reserved for
  333.     the file INSTALL.CMD).
  334.  
  335.       /* */
  336.       parse value RCOPY('*.ZIP+*.CMD A:\ /AN/SD2/NT/DF/ST:10000) with
  337.         retcd copied nbrdisks processed bytes  .
  338.       if retcd<>0 then
  339.          EXIT
  340.       .....
  341.         Code to create INSTALL.CMD
  342.       .....
  343.       if nbrdisks>1 then
  344.          do
  345.            say 'Please Re-Insert Disk #1'
  346.            pause
  347.          end
  348.       call RCOPY 'INSTALL.CMD A:\ /SD/V/#FC:'||copied||'/#FP:'||processed||
  349.         '/#ND:1/#BC:'||bytes
  350.