home *** CD-ROM | disk | FTP | other *** search
-
- ΓòÉΓòÉΓòÉ 1. RCOPY ΓòÉΓòÉΓòÉ
-
- Dean R. Ammons
- v1.12 03/96
- All Rights Reserved
- CompuServe: 73200,2513
- Internet: FCI@MSG.TI.COM
-
- RCOPY is an extension of the OS/2 2.x COPY command. With the available options,
- a single RCOPY usage can perform tasks that would require several OS/2 commands.
- In addition to the parameter controlled functions, RCOPY will:
-
- * Displays progress messages.
-
- * If the selected filename already exists in the target directory, RCOPY
- will issue a warning pause, showing the size, time and date of the current
- and new file.
-
- * As a disk gets close to filling up, RCOPY will attempt to load the smaller
- files until the smallest file remaining will not fit.
-
- * When a disk does become full, RCOPY will pause to allow inserting a new
- disk.
-
- * Pressing any other key will pause processing.
-
- * Unless overridden, a "Y/N" prompt will be issued before a new directory is
- created.
-
-
- ΓòÉΓòÉΓòÉ 1.1. Processing Options ΓòÉΓòÉΓòÉ
-
- RCOPY provides several optional command parameters to customize a process.
-
- SYNTAX: RCOPY from_spec [to_specs] [options]
-
- All options must be prefixed with a "/"
-
- [from] Enter the from_spec just like you would for the OS/2 Copy command, including
- wildcard characters. Unlike the OS/2 Copy, RCOPY allows entering multiple
- from specs, each separated by a "+" or comma. Example: RCOPY *.EXE+*.COM
- A:\. Optionally, a file containing a list of the from specs can be
- used. The list of specifications will be processed as if they were enter on
- the command line. To use this option, prefix the filename with the
- character "@". Example: RCOPY @RCOPY.LST A:\
-
- [to] Enter the to_spec just like you would for the OS/2 Copy. If there is no
- to_spec, the current directory will be used.
-
- If the to_spec does not exist, RCOPY will prompt to determine if it is a
- filename or directory. To avoid this prompt, attach a "\" to a new
- directory name or "." to a filename.
- Examples: RCOPY *.* A:\NEWDIR\ RCOPY *.CMD A:\NEWFILE.
-
- Frequently used options can be stored in the OS/2 environment variable "RCOPY";
-
- Example: SET RCOPY=/NS to always run RCOPY with "beeps" turned off
-
-
- ΓòÉΓòÉΓòÉ 1.1.1. A - Process Updated Files ΓòÉΓòÉΓòÉ
-
- Processes only files that have been marked updated by OS/2.
-
-
- ΓòÉΓòÉΓòÉ 1.1.2. AD - Assume New to_spec is a Directory ΓòÉΓòÉΓòÉ
-
- Assume the to_spec is a directory if it does not already exist, bypassing the RCOPY
- "file or directory" prompt.
-
-
- ΓòÉΓòÉΓòÉ 1.1.3. AF - Assume New to_spec is a File ΓòÉΓòÉΓòÉ
-
- Assume the to_spec is a file if it does not already exist, bypassing the RCOPY "file
- or directory" prompt.
-
-
- ΓòÉΓòÉΓòÉ 1.1.4. AFX - Assume New to_spec a Directory if there is no extension ΓòÉΓòÉΓòÉ
-
- If the to_spec does not exist and there is no extension, a new directory is assumed,
- bypassing the RCOPY "file or directory" prompt.
-
-
- ΓòÉΓòÉΓòÉ 1.1.5. AP - Append to to_spec File ΓòÉΓòÉΓòÉ
-
- Append all the from_spec files to the end of the to_spec file.
-
- Example: RCOPY FILE.A+FILE.B+FILE.C FILE.APP /AP
-
-
- ΓòÉΓòÉΓòÉ 1.1.6. AN - Assume New Disk when Current is Full ΓòÉΓòÉΓòÉ
-
- Assume a New Disk when the current disk becomes full. The Bypass and Split file
- options will not be available.
-
-
- ΓòÉΓòÉΓòÉ 1.1.7. AS - Automatically Split Files ΓòÉΓòÉΓòÉ
-
- Auto Split files when a disk becomes full and there is enough room to do the requested
- file processing (bypassing initial "load disk" prompt).
-
-
- ΓòÉΓòÉΓòÉ 1.1.8. B - Remove Update Mark on Processed Files ΓòÉΓòÉΓòÉ
-
- After processing, remove the OS/2 update mark, useful when RCOPY is used for backups.
-
-
- ΓòÉΓòÉΓòÉ 1.1.9. BO - Process Files Contained in both the From and To Directory ΓòÉΓòÉΓòÉ
-
- Process only files that exist in both the from and to directories.
-
-
- ΓòÉΓòÉΓòÉ 1.1.10. D: - Select by File Date ΓòÉΓòÉΓòÉ
-
- Select using the file date. The selection criteria can be a date (YYMMDD), actual
- number of days or a file name where the system file date will be used. The optional
- conditions are:
-
- ( - File date is older than requested.
- ) - File date is newer than requested.
- = - File date is equal to requested (default).
-
- Two /D: parameters can be used to select files between two dates. To select all 1993
- files, the parameter "/D:)921231/D:(940101" would be used. Files must meet BOTH
- conditions to be selected. To select files that meet one OR the other condition, include the
- parameter /DO.
-
- When conditions are combined on one statement, the /DO option is assumed. For example,
- "/D:)=921231" would select all files greater than OR equal to 921231.
-
-
- ΓòÉΓòÉΓòÉ 1.1.11. DC - Create Duplicate Directory on to_spec Disk ΓòÉΓòÉΓòÉ
-
- Create duplicate directory on the to_spec disk for every directory processed on the
- from_spec disk without prompting.
-
- * RCOPY C:\OS2\*.* A:\ /DC would create A:\OS2
-
- * RCOPY C:\OS2\*.* A:\TEMP would create A:\TEMP\OS2
-
-
- ΓòÉΓòÉΓòÉ 1.1.12. DD: - Drop to_specs Directory Tree Levels ΓòÉΓòÉΓòÉ
-
- Drop the first "?" levels of the to_specs directory tree.
-
- RCOPY C:\OS2\SYSTEM D:\ /DC/DD:1
- Copy all the files from C:\OS2\SYSTEM to D:\OS2
-
- RCOPY C:\OS2\SYSTEM D:\ /DC/DD:2
- Copy all the files from C:\OS2\SYSTEM to D:\
-
- Prefixing the level number with '-' will cause the first '?' levels of the from_specs
- dirctory to be dropped.
-
- Copy all the files from C:\OS2\SYSTEM to D:\SYSTEM
-
-
- ΓòÉΓòÉΓòÉ 1.1.13. DEL - Delete Selected Files ΓòÉΓòÉΓòÉ
-
- The from_spec files will be DELETED instead of copied or moved. For example, to
- delete all files with an .BAK extension on the C: drive:
-
- Example: RCOPY C:\*.BAK /DEL/S
-
-
- ΓòÉΓòÉΓòÉ 1.1.14. DF - Delete Files on Target Drive before Processing ΓòÉΓòÉΓòÉ
-
- Delete all files on the to_spec drive before processing.
-
-
- ΓòÉΓòÉΓòÉ 1.1.15. DF2 - Delete Files on Targe Drive of Second Diskette ΓòÉΓòÉΓòÉ
-
- If multiple output disks are required, delete all files starting with disk #2. Files
- will be added to the first disk without deleting.
-
-
- ΓòÉΓòÉΓòÉ 1.1.16. DO - Invoke "OR" Condition ΓòÉΓòÉΓòÉ
-
- When two /D:, /T: or /SZ:. parameters are used, invoke the "OR" condition instead of
- "AND".
-
-
- ΓòÉΓòÉΓòÉ 1.1.17. DR: - Repeat Requesed Process on Multiple Drives ΓòÉΓòÉΓòÉ
-
- Repeat the same process for "?" drives. For example, "/DR:CFG" would process the
- requested file specs on drives "C", "F" and "G" only.
-
-
- ΓòÉΓòÉΓòÉ 1.1.18. ED - Delete Files in to_specs Directories before Processing ΓòÉΓòÉΓòÉ
-
- Delete all the files in the to_specs directories before processing from_spec files.
-
-
- ΓòÉΓòÉΓòÉ 1.1.19. FO - Format Destination Diskettes ΓòÉΓòÉΓòÉ
-
- Format all output each destination diskette before processing.
-
-
- ΓòÉΓòÉΓòÉ 1.1.20. FO2 - Format Second Destination Diskette ΓòÉΓòÉΓòÉ
-
- If multiple output disks are required, only format starting with disk #2. Files will
- be added to the first disk without formatting.
-
-
- ΓòÉΓòÉΓòÉ 1.1.21. H - Process HIDDEN and SYSTEM Files ΓòÉΓòÉΓòÉ
-
- Allows processing both HIDDEN and SYSTEM files.
-
-
- ΓòÉΓòÉΓòÉ 1.1.22. IP: - Process Only Files Contained in to_specs Directory ΓòÉΓòÉΓòÉ
-
- Process only files that exists in PATHNAME.
-
- To copy all the files on "C" drive to \TEMP only if each file already exists in
- \OS2\SYSTEM
-
- RCOPY C:\*.* \TEMP /IP:\OS2\SYSTEM /S
-
-
- ΓòÉΓòÉΓòÉ 1.1.23. IP-: - Skip Files Contained in to_specs Directory ΓòÉΓòÉΓòÉ
-
- Same as /IP:, except files that DO NOT exists in PATHNAME are processed.
-
-
- ΓòÉΓòÉΓòÉ 1.1.24. L - List Select Files Only - No Processing ΓòÉΓòÉΓòÉ
-
- List files that meet selection criteria - NO processing occurs.
-
-
- ΓòÉΓòÉΓòÉ 1.1.25. LG - Log Processing Activities ΓòÉΓòÉΓòÉ
-
- Processing activities will be appended to the end of the file RCOPY.LOG in the same
- directory where RCOPY.CMD is stored. To create RCOPY.LOG in a different location, use
- /LG:<location> or /LG:<location><new log file name>.
-
- Prefixing <location> with "@" will cause RCOPY to create a new log file each time.
-
- Prefixing <location> with "!" will create a new LIST file. In this case, the file
- will only contain a list of the processed files. The file can then be used as input
- to other programs, including RCOPY (when prefixed with "@").
-
-
- ΓòÉΓòÉΓòÉ 1.1.26. M - Move Selected Files ΓòÉΓòÉΓòÉ
-
- Move the selected from_spec files to the to_specs location. Default is copy.
-
-
- ΓòÉΓòÉΓòÉ 1.1.27. MU - Process Multiple Input Disks ΓòÉΓòÉΓòÉ
-
- Process multiple input disks. To define how many input diskettes, use /MU:nn.
-
-
- ΓòÉΓòÉΓòÉ 1.1.28. N - Process New Files Only ΓòÉΓòÉΓòÉ
-
- Process only those files that do not already exist on the to_spec directory.
-
-
- ΓòÉΓòÉΓòÉ 1.1.29. NC - No COPY or MOVE Action with /PGM option ΓòÉΓòÉΓòÉ
-
- No COPY or MOVE function performed when /PGM option is used. Only required if a
- target directory is requested. Useful when using the /BO or /N options to feed
- selected files to a /PGM function.
-
-
- ΓòÉΓòÉΓòÉ 1.1.30. NS - No Sound ΓòÉΓòÉΓòÉ
-
- Suppress "beeps" issued at various prompts.
-
-
- ΓòÉΓòÉΓòÉ 1.1.31. NT- No Totals Display ΓòÉΓòÉΓòÉ
-
- Do not display totals when processing terminates.
-
-
- ΓòÉΓòÉΓòÉ 1.1.32. O - Process Older Files ΓòÉΓòÉΓòÉ
-
- Process only files that either do not exist in the to_specs directory or are older
- than those that do exist.
-
-
- ΓòÉΓòÉΓòÉ 1.1.33. OD: - Omit Processing Requested Directories ΓòÉΓòÉΓòÉ
-
- Specify a list of directories that are to be bypassed during processing;
-
- Example: RCOPY *.* C:\ /OD:\OS2,\MUGLIB
-
- All sub-directories belonging to the requested directory will also be bypassed. A
- filename listing the directories can also be used by prefixing with "@";
-
- Example: RCOPY *.* C:\ /OD:@DIR.LST
-
- To bypass just the first directory of a tree, attach a '\' to the directory name
-
- Example: RCOPY *.* C:\ /OD:\OS2\,\MUGLIB
-
-
- ΓòÉΓòÉΓòÉ 1.1.34. OF: - Omit Selecting Requested Files ΓòÉΓòÉΓòÉ
-
- Specify a list of filenames or patterns to be bypassed during processing;
-
- Example: RCOPY *.* C:\ /OF:*.BAK,*.ZIP,*.$*
-
- A filename listing the specs can also be used by prefixing with "@";
-
- Example: RCOPY *.* C:\ /OF:@FILE.LST
-
-
- ΓòÉΓòÉΓòÉ 1.1.35. P - Pause at Each Selected File ΓòÉΓòÉΓòÉ
-
- Pause before each file is processed.
-
-
- ΓòÉΓòÉΓòÉ 1.1.36. PE - Pause at End of Processing ΓòÉΓòÉΓòÉ
-
- Pause at the end of processing. Useful when executing RCOPY from a window that
- closes on exit. To control the length of the pause, enter /PEx, where "x" is the
- number of seconds to pause.
-
-
- ΓòÉΓòÉΓòÉ 1.1.37. PGM: - Execute External Program ΓòÉΓòÉΓòÉ
-
- Execute the command "xxx" against all the selected files. To also do a COPY or MOVE
- before executing the program, a TO directory must be included. Multiple /PGM: options
- can be requested.
-
- $ Replaced with the full filenames of each selected file.
- # Replace with filename of each selected file (no path).
- ] Replaced with '/'.
- { Replaced with directory of file selected for processing.
- % Replaced with drive of file selected for processing
- ) Replaced with '>'
- ( Replaced with '<'
- ! Replaced with '|'
-
- The following example shows how to print then zip every file on the C: drive with a
- ".DOC" extension.
-
- RCOPY C:\*.DOC /S/PGM:PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
-
- If a command is prefixed with "-", the commands will be written to PGM.CMD instead of
- being executed.
-
- RCOPY C:\*.DOC /S/PGM:-PRINT/PGM:PKZIP2 -U ZIPFILE $ )NUL
-
- RCOPY defaults to passing ALL the selected files to the "/PGM:" program. To limit
- the number of files passed use the option "/PGMn:", where "n" is the number of files
- to pass. For example, to pass 30 selected files to PKZIP2 and one to PRINT per
- execution:
-
- RCOPY C:\*.DOC /S/PGM:PRINT/PGM30:PKZIP2 -U ZIPFILE $ )NUL
-
-
- ΓòÉΓòÉΓòÉ 1.1.38. R - Replace Duplicate File Names in Target Directory ΓòÉΓòÉΓòÉ
-
- Replace duplicate files without prompting.
-
-
- ΓòÉΓòÉΓòÉ 1.1.39. RD - Reset Date of Processed Files ΓòÉΓòÉΓòÉ
-
- Reset date of processed files to current date.
-
-
- ΓòÉΓòÉΓòÉ 1.1.40. RE - Remove Empty Directories ΓòÉΓòÉΓòÉ
-
- Remove empty directories after MOVE process.
-
-
- ΓòÉΓòÉΓòÉ 1.1.41. RO - Process Read-Only Files ΓòÉΓòÉΓòÉ
-
- Allow MOVING, REPLACING or DELETING Read-Only Files. Copying Read-Only files will
- always work.
-
-
- ΓòÉΓòÉΓòÉ 1.1.42. S - Process Sub-Directories ΓòÉΓòÉΓòÉ
-
- Process all from_spec sub-directories.
-
-
- ΓòÉΓòÉΓòÉ 1.1.43. SA - Save Duplicate Target Files ΓòÉΓòÉΓòÉ
-
- Instead of replacing a file, rename it by changing the last to positions of the
- file's extension to "01" to "99".
-
-
- ΓòÉΓòÉΓòÉ 1.1.44. SD - Short Display ΓòÉΓòÉΓòÉ
-
- The progress display shows only the files processed and the final totals.
-
-
- ΓòÉΓòÉΓòÉ 1.1.45. SD2 - Shorter Display ΓòÉΓòÉΓòÉ
-
- The progress display shows only the files processed.
-
-
- ΓòÉΓòÉΓòÉ 1.1.46. SE - Skip Duplicates ΓòÉΓòÉΓòÉ
-
- Skip files that are EXACT duplicates.
-
-
- ΓòÉΓòÉΓòÉ 1.1.47. SF: - Split Files ΓòÉΓòÉΓòÉ
-
- Splits the selected files into sub-files of "nnn" kilobytes (kbyte=1024 bytes). The
- sub-files are named filename.001, filname.002, etc and will be stored in the copy-to
- directory.
-
-
- ΓòÉΓòÉΓòÉ 1.1.48. ST: - Reserve Space on Target Drive ΓòÉΓòÉΓòÉ
-
- Reserve "?" amount of freespace on the to_specs drive. Once the minimum is reached,
- RCOPY will issue the load-next-disk prompt.
-
-
- ΓòÉΓòÉΓòÉ 1.1.49. SZ: - Select by File Size ΓòÉΓòÉΓòÉ
-
- Select a file based on its size. Same rules as /D:.
-
-
- ΓòÉΓòÉΓòÉ 1.1.50. T - Test mode ΓòÉΓòÉΓòÉ
-
- Test mode. No actual processing takes place, but normal processing messages are
- still issued
-
-
- ΓòÉΓòÉΓòÉ 1.1.51. T: - Select by File Time ΓòÉΓòÉΓòÉ
-
- Select a file based on its file time. Same rules as /D:
-
-
- ΓòÉΓòÉΓòÉ 1.1.52. U - Process Newer Files ΓòÉΓòÉΓòÉ
-
- Process only files that either do not exist in the to_specs directory or are newer
- than those that do exist.
-
-
- ΓòÉΓòÉΓòÉ 1.1.53. US - Unsplit Split Files ΓòÉΓòÉΓòÉ
-
- Unsplits, or joins, the multiple files created using the /SF: option. For example,
- "RCOPY MYFILE.ZIP /US" will join the files MYFILE.001, MYFILE.002, ... into the file
- MYFILE.ZIP. The join file will be stored in the copy-to directory. If the split
- files are stored on multiple diskettes, use the /MU option (diskettes must be
- processed in correct sequence).
-
-
- ΓòÉΓòÉΓòÉ 1.1.54. V - Verify Process ΓòÉΓòÉΓòÉ
-
- Verify a process using the OS/2 verify option.
-
-
- ΓòÉΓòÉΓòÉ 1.1.55. WA - Pause for Diskette ΓòÉΓòÉΓòÉ
-
- Pause RCOPY's initial processing and prompt for a diskette.
-
-
- ΓòÉΓòÉΓòÉ 1.1.56. WY - Why not Selected ΓòÉΓòÉΓòÉ
-
- Display the files that were skipped and tell why.
-
-
- ΓòÉΓòÉΓòÉ 1.2. Usage Examples ΓòÉΓòÉΓòÉ
-
- 1) Move all the files on the A: drive to the appropriate sub-directories on the C:
- drive, replacing files that already exists and removing the directories from A:.
-
- call RCOPY 'A:\*.* C:\ /S/DC/M/RE'
-
- 2) Copy all the files on the C: drive to the appropriate sub-directories on the A:
- drive that were updated today, bypassing directories listed in the file RCOPY.OD
- and bypassing the filespecs in the file RCOPY.OF.
-
- call RCOPY 'C:\*.* A:\ /S/DC/V/OD:@C:\RCOPY.OD/OF:@C:\RCOPY.OF/D:)1'
-
- 3) The following is an example of multiple RCOPY runs, with each execution using the
- statistics from the previous run (10,000 bytes is reserved for the file
- INSTALL.CMD).
-
- /* */
- parse value RCOPY('*.ZIP+*.CMD A:\ /AN/SD2/NT/DF/ST:10000) with retcd
- copied nbrdisks processed bytes .
- if retcd<>0 then
- EXIT
- .....
- Code to create INSTALL.CMD
- .....
- if nbrdisks>1 then
- do
- say 'Please Re-Insert Disk #1'
- pause
- end
- call RCOPY 'INSTALL.CMD A:\ /SD/V/#FC:'||copied||'/#FP:'||processed||
- '/#ND:1/#BC:'||bytes
-
-
- ΓòÉΓòÉΓòÉ 1.3. RCOPY Return Codes ΓòÉΓòÉΓòÉ
-
- RCOPY returns five values.
-
- 1) Return code "0" if process completed successfully or "1" if not
- 2) Number of files copied/moved/deleted, depending on option used. If the /SF:
- option is used, this will be the number of split files created. If the /US
- options is used, this will be the number of joined files created.
- 3) Number of input disks processed
- 4) Number of files processed, including those skipped or bypassed
- 5) Number of bytes copied/moved/deleted
-
- The syntax to capture these values:
-
- parse value RCOPY(specs) with ret_cd copied nbr_disks processed bytes .
-
- The following parameters are available for passing the values in 2-5 from one
- execution of RCOPY to another.
-
- /#ND:n - Number Disks
- /#FC:n - Files copied
- /#FP:n - Files processed
- /#BC:n - Bytes copied
-
- When these values are passed to RCOPY, they are included in final totals (useful when
- command file does multiple RCOPYs with different options).
-