home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / cpy11a.zip / CPY.TXT < prev    next >
Text File  |  1992-04-24  |  16KB  |  341 lines

  1.  
  2.                                 COPY  UTILITY
  3.  
  4.                   (Version 1.1A Maintenance Release, 4/24/92)
  5.  
  6.  
  7.              *******************************************************
  8.              *                                                     *  
  9.              *     This version includes 2 NEW PARAMETERS:         *
  10.              *                                                     *
  11.              *     * 'V' copies the volume label which follows     *
  12.              *       to the volume of target file specification.   *
  13.              *                                                     *
  14.              *     * 'Z' searches all non-floppy drives (C,D,E     *
  15.              *       etc.) for the source file specification.      *
  16.              *                                                     *
  17.              *                                                     *
  18.              *     It also includes these BUG FIXES:               *
  19.              *                                                     *
  20.              *     * The "Target file spec not allowed" error      * 
  21.              *       message no longer appears when a valid        *
  22.              *       target file spec is given.                    *
  23.              *                                                     *
  24.              *     * The program no longer bombs if NO source      *  
  25.              *       file spec extension is given.                 *  
  26.              *                                                     * 
  27.              *     * The program processes correctly if Search     *
  28.              *       and Confirm parameters are off (-SOFF and     *
  29.              *       -COFF respectively) instead of always         *
  30.              *       finding no files.                             *
  31.              *                                                     *
  32.              *******************************************************
  33.  
  34.  
  35. NAME:        CPY
  36.  
  37.  
  38. DESCRIPTION: CPY is a fast and powerful utility which can optionally:
  39.  
  40.              * SEARCH for wildcard-delimited files and/or directories 
  41.                on your entire drive, the current directory and all
  42.                subordinate directories, or just the current directory 
  43.  
  44.              * COPY or MOVE all found files and/or directories to a 
  45.                specified location 
  46.  
  47.              * RENAME any duplicate files being copied or moved to the 
  48.                specified location
  49.  
  50.              * CONFIRM all copy/move/rename activity before execution
  51.                (giving you a last chance to change your mind!)
  52.  
  53.  
  54. FORMAT:  CPY   [Parm] [Parm] [Parm]   [\Spath1\]Sfn1.Sfx1...
  55.                [Parm] [Parm] [Parm]   [\Spathn\Sfnn.Sfxn]   [\Tpath\Tfn.Tfx]
  56.              
  57.             Where...
  58.  
  59.             Parm       [optional] is a parameter.  See explanation below.
  60.  
  61.             \Spath1\   [optional] is complete path of the first source file 
  62.                        spec. If no path is given, current directory is assumed.
  63.  
  64.             SFn1.SFx1  is name and extension of the first source file spec.
  65.                        Wildcards (*,?) can be used as delimiters.                        
  66.                             
  67.             \SPathn\   [optional] is path, name and extension of each
  68.             Sfnn.Sfxn  additional source file spec.  Wildcards can be used
  69.                        as delimiters.
  70.                        
  71.             \Tpath\    [optional] is path, name and extension of the target
  72.             Tfn.Tfx    file spec.  If none is given, the current directory 
  73.                        is assumed.  
  74.             
  75.  
  76. PARAMETERS  Each parameter has three parts: 
  77.  
  78.             * a dash (-)
  79.  
  80.             * the parameter type (1, B, C, D, E, F, G, J,
  81.                                   M, O, P, Q, S, T, X, Z)
  82.  
  83.             * an on/off indicator (1, C, D, F, J, M, O, Q, S, X, Z)
  84.                      OR
  85.               a file you specify  (G, P, T) 
  86.                      OR
  87.               a date you specify  (B, E)
  88.                      OR
  89.               a volume label you specify (V) 
  90.  
  91.             (For example: -SON, -COFF, -T\DIR1\TEST.LOG)
  92.  
  93.  
  94.             PARAMETER     If Parameter is ON        If Parameter is OFF
  95.             ----------------------------------------------------------------
  96.  
  97.                  1      Copies source files and     Recreates existing source
  98.                         directories to target       directory structure off
  99.                         directory.                  target directory.
  100.  
  101.                  B      Uses date which follows     No date range is used
  102.                         as beginning date of a      as selection criteria.
  103.                         date range for selection
  104.                         criteria.
  105.  
  106.                  C      Confirms all copy/move/     Automatic execution
  107.                         rename activity prior to
  108.                         execution.
  109.  
  110.                  D      Creates unique filenames    Each duplicate file being
  111.                         for all duplicate files     moved or copied replaces 
  112.                         copied or moved to the      (overwrites) duplicate
  113.                         target directory.  A        in target directory.
  114.                         number (0-9) replaces       Only the last-moved
  115.                         the last character of       duplicate remains once
  116.                         each duplicate file's       copy or move is done.
  117.                         extension. 
  118.  
  119.                  E      Uses date or number which   No date range is used
  120.                         follows as end date of a    as selection criteria.
  121.                         date range for selection
  122.                         criteria.
  123.  
  124.                  F      Mirrors execution without   Automatic execution
  125.                         doing anything ("Fakes"
  126.                         it so you can see the
  127.                         consequences).
  128.                 
  129.                  G      Creates a log file that        No log file
  130.                         records execution.
  131.  
  132.                  J      Searches for source files   Searches only specified
  133.                         or directories just on      directory.
  134.                         the PATH specified in
  135.                         your Autoexec.bat file.
  136.  
  137.                  M      MOVES all source files/     COPIES all source files/
  138.                         directories to target.      directories to target.
  139.                  
  140.                  O      On a MOVE, deletes Read     No deletion of Read Only
  141.                         Only source files (it       files
  142.                         has no effect on a
  143.                         COPY since source files
  144.                         are never deleted).
  145.  
  146.                  P      Gets parameters and/or      You must type all file
  147.                         file specs for run from     specs and/or parameters.
  148.                         a file you specify.      
  149.  
  150.                  Q      Executes CPY without        Displays results on
  151.                         displaying results on       screen.
  152.                         screen ("Quiet" mode).
  153.                          
  154.                  S      Searches specified source   Searches only specified
  155.                         directory PLUS all sub-     source directory.
  156.                         ordinate directories for 
  157.                         files and/or directories
  158.                         meeting source file spec.
  159.  
  160.                  T      Uses information which      Uses current directory
  161.                         follows as target file      as target file spec.
  162.                         spec.  If directory does
  163.                         not exist, CPY creates it.
  164.  
  165.                  V      Copies volume label which   Does not change target
  166.                         follows to volume of the    volume's label.
  167.                         target file specification.
  168.                         The existing target volume
  169.                         label must conform to 
  170.                         normal DOS volume label
  171.                         standards in order to be
  172.                         overwritten. 
  173.  
  174.                  X      Changes date of all files   Does not change date.
  175.                         moved or copied to target
  176.                         directory to the system
  177.                         date on your computer.
  178.  
  179.                  Z      Searches all non-floppy     Searches current drive.
  180.                         drives (C, D, E etc.)
  181.                         for the source file
  182.                         specification.                                  
  183.  
  184.  
  185. NOTES:               1) All parameters except 'C' are OFF by default.  You
  186.                         only specify parameters to change these settings.
  187.                         Parameter settings remain active for current run
  188.                         of CPY unless you change them.
  189.  
  190.                      2) You can specify any combination of parameters for
  191.                         each source file spec.  However, these combinations
  192.                         do NOT make sense:
  193.  
  194.                         * Having 'C' (confirm) and 'F'(fake execution) ON at
  195.                           the same time
  196.  
  197.                         * Having 'O' (delete Read Only source files) ON for a
  198.                           COPY run since no files are deleted on a copy
  199.  
  200.                         * Having 'J' (search your Path) and 'S' (search 
  201.                           specified and all subordinate directories) ON at
  202.                           the same time
  203.  
  204.                      3) When using DATE RANGE parameters 'B' and 'E',
  205.                         enter date/time in this format: MM-DD-YYYY_HH-MM.
  206.                         A / can be used instead of -.  Also, the hours/
  207.                         seconds section (_HH-MM) is optional.
  208.  
  209.                         For the END date ('E'), you can enter an integer 
  210.                         instead of a date.  This number can be positive or
  211.                         negative and indicates the total period of the date
  212.                         range.  For example, 10 means a date ten days AFTER
  213.                         the beginning date. -10 means a date ten days BEFORE
  214.                         the beginning date.  If no date is entered, the
  215.                         current date is assumed.
  216.  
  217.                      4) You can interrupt CPY during execution by pressing
  218.                         any key.  If you respond 'N' to the confirmation
  219.                         message which appears, processing for the current 
  220.                         run terminates. 
  221.  
  222.                      5) If a directory meets the specified source file spec,
  223.                         CPY copies or moves that directory PLUS all files 
  224.                         and/or directories in it.
  225.  
  226.                      6) When using VOLUME LABEL parameter 'V', if you do 
  227.                         NOT specify a volume label the current one from the 
  228.                         last-named source file specification is used.  For
  229.                         example, if you name source file specs from drives
  230.                         C and D, the volume label from D is written on the
  231.                         volume of the target file specification.    
  232.  
  233.                        
  234. EXAMPLE 1    CPY  SOURCE1.FIL  SOURCE2.FIL  SOURCE3.FIL  -T\DIR1
  235.  
  236.              This searches the current directory for three source files.
  237.              If any exist, a confirmation message appears.  If you respond
  238.              'Y', the files are copied to the DIR1 target directory.
  239.  
  240.  
  241. EXAMPLE 2    CPY  -SON -COFF -MON  \DIR1\*.BAK  
  242.  
  243.              This searches the DIR1 directory--and all subordinate
  244.              directories--for non-Read Only files with an extension of BAK.
  245.              It then MOVES those files to the current directory without
  246.              confirming that activity.
  247.  
  248.  
  249. EXAMPLE 3    CPY   -COFF -MON -OON -FON   ANYFILE.*   -T\NEWDIR
  250.  
  251.              This searches the current directory for all files named ANYFILE.
  252.              It then "fakes" moving all such files to NEWDIR so that you can
  253.              see which files will be affected IF you execute this command.
  254.  
  255.              NOTE: To really move these files, press F3, type '-FOFF' to turn
  256.              the Fake option off, and then press Enter.  '-OON' directs all 
  257.              Read Only source files to be moved and then deleted from the 
  258.              current directory along with non-Read Only files.
  259.  
  260.  
  261. EXAMPLE 4    CPY   -P\DIR1\PARM.FIL 
  262.  
  263.              This directs CPY to file PARM.FIL for all parameters and file
  264.              specs. If that file contains this information...
  265.  
  266.                        -SON -MON -COFF -QON  C:\*.BAK  -T\BACKUP
  267.  
  268.              CPY searches the C drive for all non-Read Only BAK files.  It 
  269.              then moves all such files to the BACKUP directory.  No confirm-
  270.              ation message is displayed (-COFF), and execution is not echoed
  271.              on the screen (-QON).
  272.  
  273.  
  274. EXAMPLE 5    CPY  -DON -G\DIR1\LOG.FIL  C:\SOMEFILE.*  -T\DIR2
  275.  
  276.              This searches the C drive for all non-Read Only files named
  277.              SOMEFILE. It then confirms total files found.  If you respond 
  278.              'Y', it copies those files to the TARGET1 directory.  A log  
  279.              file LOG.FIL records execution (ie, captures everything that 
  280.              appears on the screen).             
  281.  
  282.              NOTE: -DON tells CPY to uniquely rename all duplicate files 
  283.              copied to DIR2.  For example, if there were four SOMEFILE.BAK
  284.              files the last three would have their extensions renamed BA0, 
  285.              BA1 and BA2 respectively.
  286.  
  287.  
  288. EXAMPLE 6    CPY  -SON -OON -MON  C:\DIR1\*.BAK  -T\TARGET1  -COFF  D:\*.BAK
  289.  
  290.              This searches the DIR1 directory--and all subordinate
  291.              directories on your C drive--for files with an extension
  292.              of BAK.  It then confirms total files found.  If you respond 
  293.              'Y', it moves those files to the TARGET1 directory. 
  294.  
  295.              Finally, it searches the D drive for .BAK files and moves
  296.              them to the current directory.  NB: No confirmation message
  297.              appears since that parameter has been turned off (-COFF).
  298.  
  299.  
  300. EXAMPLE 7    CPY  -SON -1ON  \DIR1\*.*  -T\NEWDIR 
  301.  
  302.              This searches the DIR1 directory--and all subordinate
  303.              directories--for all files.  It then copies those files to
  304.              the new directory NEWDIR.   
  305.  
  306.              NOTE: If '1' were OFF, the existing subdirectory structure would
  307.              be recreated under NEWDIR.
  308.  
  309.  
  310. EXAMPLE 8    CPY  -SON  -B04/11/1992_10:30AM  -E05/11/92  C:\*.BAK  -T\NEWDIR
  311.              
  312.              This searches your C drive for .BAK files with dates between
  313.              April 11th, 1992 at 10:30AM and May 11th, 1992.  It then
  314.              confirms all files found, and if you respond 'Y' it copies
  315.              them to NEWDIR.
  316.  
  317.  
  318. EXAMPLE 9    CPY   COFF -MON -B01-01-1992  *.ZIP  -T\NEWDIR
  319.  
  320.              This searches the current drive for ZIP files with 1992 dates.
  321.              It then moves those files to NEWDIR.  Note that the current 
  322.              date is used by default for END date since none is specified.
  323.              
  324.  
  325. EXAMPLE 10   CPY  -JON -DON -XON  *.BAK  -T\DUPEFLES
  326.  
  327.              This searches all directories specified in your Autoexec.bat's
  328.              PATH command for .BAK files and confirms the total found.  If
  329.              you respond 'Y', it copies those files to the DUPEFLES directory 
  330.              and changes their dates to the system date.  It also creates 
  331.              unique filenames for any duplicates. 
  332.  
  333.     
  334. EXAMPLE 11   CPY  -SON -VNEWLABEL -ZON  \DIR1\*.BAK  -T\DUPEFLES
  335.  
  336.              This searches for .BAK files on all DIR1 directories on all 
  337.              non-floppy drives, then confirms the total found. If you respond
  338.              'Y', it copies them to the DUPEFLES directory and changes the
  339.              target volume's label to NEWLABEL.
  340.  
  341. ---End of Document ( CPY.TXT )