APPLICATION NAME COPYRIGHT 1992 SILENT PARTNERS, INC. PORTIONS COPYRIGHT 1987, 1988, 1989, 1990, 1991, 1992 GLENN A. FIELD THIS SOFTWARE IS PROVIDED AS-IS. THERE ARE NO WARRANTIES, EXPRESSED OR IMPLIED. COPY UTILITY (Version 1.2, 4/26/92) ******************************************************* * * * This version includes these improvements: * * * * * Several bug fixes! * * * * * The 'A' parameter APPENDS specified files. * * * * * The 'I' parameter lets you limit source file * * search criteria according to the combination * * of ATTRIBUTES specified. * * * * * The '?' parameter brings up on-line help * * * * * Documentation is clearer and more complete. * * * * THANKS to everyone who has been using CPY for * * providing excellent feedback regarding bugs * * and suggested enhancements. Keep them coming!!! * * * * ******************************************************* SILENT PARTNERS, INC. DISCLAIMS ALL WARRANTIES RELATING TO THIS SOFTWARE, WHETHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ALL SUCH WARRANTIES ARE EXPRESSLY AND SPECIFICALLY DISCLAIMED. NEITHER SILENT PARTNERS, INC. NOR ANYONE ELSE WHO HAS BEEN INVOLVED IN THE CREATION, PRODUCTION, OR DELIVERY OF THIS SOFTWARE SHALL BE LIABLE FOR ANY INDIRECT, CONSEQUENTIAL, OR INCIDENTAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE SUCH SOFTWARE EVEN IF SILENT PARTNERS, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES OR CLAIMS. IN NO EVENT SHALL SILENT PARTNERS, INC.'S LIABILITY FOR ANY DAMAGES EVER EXCEED THE PRICE PAID FOR THE LICENSE TO USE THE SOFTWARE, REGARDLESS OF THE FORM OF CLAIM. THE PERSON USING THE SOFTWARE BEARS ALL RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. Some states do not allow the exclusion of the limit of liability for consequential or incidental damages, so the above limitation may not apply to you. This agreement shall be governed by the laws of the State of Connecticut and shall inure to the benefit of Silent Partners, Inc. and any successors, administrators, heirs and assigns. Any action or proceeding brought by either party against the other arising out of or related to this agreement shall be brought only in a STATE or FEDERAL COURT of competent jurisdiction located in Tolland County, Connecticut. The parties hereby consent to in personam jurisdiction of said courts. NAME: CPY DESCRIPTION: CPY is a fast and powerful utility which can optionally: * SEARCH for wildcard-delimited files and/or directories on your entire drive, the current directory and all subordinate directories, or just the current directory * COPY or MOVE all found files and/or directories to a specified location * RENAME any duplicate files being copied or moved to the specified location * APPEND a series of source files onto a destination file * CONFIRM all copy/move/rename activity before execution (giving you a last chance to change your mind!) FORMAT: CPY [Parm] [\Spath1\]Sname1.Ext...[Parm] [\Spathn\Snamen.Ext] [-ADpath\Dname.Ext] OR [-TDpath\Dname.Ext] Where... Parm [optional] is a parameter. See explanation below. \Spath1\ [optional] is complete path of the first source file spec. If no path is given, current directory is assumed. Sname1.Ext is name and extension of the first source file spec. Wildcards (*,?) can be used as delimiters. \SPathn\ [optional] is path, name and extension of each Snamen.Ext additional source file spec. Wildcards can be used as delimiters. Dpath\ [optional] is path, name and extension of destination Dname.Ext file spec. If none is given, the current directory is assumed. (NOTE: 'A' and 'T' are parameters that can only be used with the destination file spec). PARAMETERS Each parameter has three parts: * a dash (-) * the parameter type (1, B, C, D, E, F, G, J, M, O, P, Q, S, T, X, Z) * ONE of the following: THIS PART IS USED BY THESE PARAMETERS ----------------------------------------------------------- * ON or OFF indicator 1, C, D, F, J, M, O, Q, S, W, X, Z * a file A, G, P, T * a date B, E * a volume label V * a combination of letters A indicating attributes PARAMETER If Parameter is ON If Parameter is OFF ---------------------------------------------------------------- ? Brings up on-line help. No on-line help appears. (Specify 'CPY ?') 1 Copies source files and Recreates existing source directories to target directory structure off directory. target directory. A Appends all source files No appending occurs. to the destination file in the order specified. To append files to an existing file, specify it as both a source file and the destination file. B Uses date which follows No date range is used as BEGIN date of a date as selection criteria. range for selection criteria (see 'E' below). C Confirms all copy/move/ Automatic execution rename activity prior to execution. D Creates unique filenames Each duplicate file being for all duplicate files moved or copied replaces copied or moved to the (overwrites) duplicate target directory. A in target directory. number (0-9) replaces the last character of each duplicate file's extension. E Uses date or number which No date range is used follows as END date of a as selection criteria. date range for selection criteria (see 'B' above). F Mirrors execution without Automatic execution doing anything ("Fakes" it so you can see the consequences). G Creates a log file that No log file records execution. I Limits source file search Search criteria is not criteria according to the limited by attributes. combination of ATTRIBUTES specified. J Searches for source files Searches only specified or directories just on directory. the PATH specified in your Autoexec.bat file. M MOVES all source files/ COPIES all source files/ directories to target. directories to target. O On a MOVE, deletes Read No deletion of Read Only Only source files (it files. has no effect on a COPY since source files are never deleted). P Gets parameters and/or You must type all file file specs for run from specs and/or parameters. a file you specify. Q Executes CPY without Displays results on displaying results on screen. screen ("Quiet" mode). S Searches specified source Searches only specified directory PLUS all sub- source directory. ordinate directories for files and/or directories meeting source file spec. T Uses information which Uses current directory follows as target file as target file spec. spec. If directory does not exist, CPY creates it. V Copies volume label which Does not change target follows to volume of the volume's label. target file specification. The existing target volume label must conform to normal DOS volume label standards in order to be overwritten. W Verifies all WRITES to No write verification. destination directory. X Changes date of all files Does not change date. moved or copied to target directory to the system date on your computer. Z Searches all non-floppy Searches current drive. drives (C, D, E etc.) for the source file specification. NOTES: 1) All parameters except 'C' are OFF by default. You only specify parameters to change these settings. Parameter settings remain active for current run of CPY unless you change them. 2) You can specify any combination of parameters for each source file spec. However, these combinations do NOT make sense: * Specifying 'A' (append) and 'T' (destination file) at the same time. Use only one of these with the destination file. * Having 'C' (confirm) and 'F'(fake execution) ON at the same time. * Having 'O' (delete Read Only source files) ON for a COPY run since no files are deleted on a copy. * Having 'J' (search your Path) and 'S' (search specified and all subordinate directories) ON at the same time. 3) When using DATE RANGE parameters 'B' and 'E', enter date/time in this format: MM-DD-YYYY_HH-MM. A / can be used instead of -. Also, the hours/ seconds section (_HH-MM) is optional. For the END date ('E'), you can enter an integer instead of a date. This number can be positive or negative and indicates the total period of the date range. For example, 10 means a date ten days AFTER the beginning date. -10 means a date ten days BEFORE the beginning date. If no date is entered, the current date is assumed. 4) You can interrupt CPY during execution by pressing any key. If you respond 'N' to the confirmation message which appears, processing for the current run terminates. 5) If a directory meets the specified source file spec, CPY copies or moves that directory PLUS all files and/or directories in it. 6) For ATTRIBUTE paramter 'I', a source file must have all the attributes specified in order to be selected. It can have other attributes as well. Here are the allowable letters and their meanings: THIS LETTER MEANS THIS ATTRIBUTE ---------------------------------------------------- A Archive D Directory H Hidden R Read Only S System V Volume Label 7) When using VOLUME LABEL parameter 'V', if you do NOT specify a volume label the current one from the last-named source file specification is used. For example, if you name source file specs from drives C and D, the volume label from D is written on the volume of the target file specification. 8) Verifying all source file WRITES using parameter 'W' ensures that all copies and moves are successfully completed. However, it significantly increases total execution time. EXAMPLE 1 CPY SOURCE1.FIL SOURCE2.FIL SOURCE3.FIL -T\DIR1 This searches the current directory for three source files. If any exist, a confirmation message appears. If you respond 'Y', the files are copied to the DIR1 target directory. EXAMPLE 2 CPY -SON -COFF -MON \DIR1\*.BAK This searches the DIR1 directory--and all subordinate directories--for non-Read Only files with an extension of BAK. It then MOVES those files to the current directory without confirming that activity. EXAMPLE 3 CPY -COFF -MON -OON -FON ANYFILE.* -T\NEWDIR This searches the current directory for all files named ANYFILE. It then "fakes" moving all such files to NEWDIR so that you can see which files will be affected IF you execute this command. NOTE: To really move these files, press F3, type '-FOFF' to turn the Fake option off, and then press Enter. '-OON' directs all Read Only source files to be moved and then deleted from the current directory along with non-Read Only files. EXAMPLE 4 CPY -P\DIR1\PARM.FIL This directs CPY to file PARM.FIL for all parameters and file specs. If that file contains this information... -SON -MON -COFF -QON C:\*.BAK -T\BACKUP CPY searches the C drive for all non-Read Only BAK files. It then moves all such files to the BACKUP directory. No confirm- ation message is displayed (-COFF), and execution is not echoed on the screen (-QON). EXAMPLE 5 CPY -DON -G\DIR1\LOG.FIL C:\SOMEFILE.* -T\DIR2 This searches the C drive for all non-Read Only files named SOMEFILE. It then confirms total files found. If you respond 'Y', it copies those files to the TARGET1 directory. A log file LOG.FIL records execution (ie, captures everything that appears on the screen). NOTE: -DON tells CPY to uniquely rename all duplicate files copied to DIR2. For example, if there were four SOMEFILE.BAK files the last three would have their extensions renamed BA0, BA1 and BA2 respectively. EXAMPLE 6 CPY -SON -OON -MON C:\DIR1\*.BAK -T\TARGET1 -COFF D:\*.BAK This searches the DIR1 directory--and all subordinate directories on your C drive--for files with an extension of BAK. It then confirms total files found. If you respond 'Y', it moves those files to the TARGET1 directory. Finally, it searches the D drive for .BAK files and moves them to the current directory. NOTE: No confirmation message appears since that parameter has been turned off (-COFF). EXAMPLE 7 CPY -SON -1ON \DIR1\*.* -T\NEWDIR This searches the DIR1 directory--and all subordinate directories--for all files. It then copies those files to the new directory NEWDIR. NOTE: If '1' were OFF, the existing subdirectory structure would be recreated under NEWDIR. EXAMPLE 8 CPY -SON -B04/11/1992_10:30AM -E05/11/92 C:\*.BAK -T\NEWDIR This searches your C drive for .BAK files with dates between April 11th, 1992 at 10:30AM and May 11th, 1992. It then confirms all files found, and if you respond 'Y' it copies them to NEWDIR. EXAMPLE 9 CPY COFF -MON -B01-01-1992 *.ZIP -T\NEWDIR This searches the current drive for ZIP files with 1992 dates. It then moves those files to NEWDIR. Note that the current date is used by default for END date since none is specified. EXAMPLE 10 CPY -JON -DON -XON *.BAK -T\DUPES This searches all directories specified in your Autoexec.bat's PATH command for .BAK files and confirms the total found. If you respond 'Y', it copies those files to the DUPES directory and changes their dates to the system date. It also creates unique filenames for any duplicates. EXAMPLE 11 CPY -SON -VNEWLABEL -ZON \DIR1\*.BAK -T\DUPES This searches for .BAK files on all DIR1 directories on all non-floppy drives, then confirms the total found. If you respond 'Y', it copies them to the DUPES directory and changes the target volume's label to NEWLABEL. EXAMPLE 12 CPY -COFF SOURCE1.FIL SOURCE2.FIL SOURCE3.FIL -AAPPEND.FIL This searches the current directory for the three specified source files. It then creates APPEND.FIL which includes those three files. EXAMPLE 13 CPY -WON -IAR *.BAK -TDIR1 This searches the current directory for all .BAK files with Archive and Read Only attributes (-IAR). It then verifies total files found. If you respond 'Y', it copies those files to the DIR1 directory and then verifies those writes.