![]() |
DOS COPYing Shortcuts |
The information in this document applies to:
WordPerfect® 5.1 for DOS
Problem
Solutions: Several keystrokes can be saved by using some of the built-in DOS shortcuts. For example, take a typical COPY command: C>COPY R:\ARCHIVES\WP50\PRINT1\7-21-89\*.* C:\PRINTERS This command, which is used quite often, can be substantially reduced by using just a couple of techniques. * Enter commands from the destination directory. In that way, you can eliminate the target on the command line: C>CD\PRINTERS C>COPY R:\ARCHIVES\WP50 PRINT1\7-21-89\*.* * Use "." or ".." to specify directories. A period (.) signifies the current directory (on whichever drive) and two periods (..) signify the parent directory. On some machines, three periods (...) signify the grandparent directory (the grandparent of C:\WP50\FILES is C:\), but these machines are the exception. When you use the period to specify a directory, the *.* wildcards are unnecessary: C>COPY A:. (instead of A:*.*) C>COPY R:\ARCHIVES\WP50\PRINT1\7-21-89\. For any subdirectory, this can be shortened even further by specifying the directory and leaving out the \.: C>COPY R:\ARCHIVES\WP50\PRINT1\7-21-89 * Use "CD" to change the SOURCE directory. By moving the source directory, you can reduce it even further: C>CD R:\ARCHIVES\WP50\PRINT1\7-21-89 C>COPY R:. * Use Command-line Variables. This is especially useful if you have to copy multiple files in multiple directories. In the above samples, the user is only copying one printer .ALL file. But if the user needed to copy several .ALL files, the user can make this easier by using the following DOS command: C>FOR %1 in (1 2 3 4 ...) DO COPY R:\ARCHIVES\WP50\PRINT%1\7-21- 89 which can be shortened by using some of the above techniques to C>CD R:\ARCHIVES\WP50 C>FOR %1 in (1 2 3 4 ...) DO COPY R:PRINT%1\7-21-89 * Use Batch Files. For something like this, where nothing really changes but the date and the number of disks, batch files can come in handy. However you type it, when you create the batch file, you only do it once. (Batch file contains) FOR %%1 in (1 2 3 4 ...) DO COPY R:\ARCHIVES\WP50\PRINT%%1\%1 where %%1 is the same as %1 at the DOS prompt, and %1 is another command-line variable. If the batch file is called GETPRINT.BAT, you would type C>GETPRINT 7-21-89 and the %1 would be replaced by 7-21-89 and the %%1 would be replaced, one by one, by the numbers in parentheses. * Use external DOS commands. Since the PRINTER example isn't the best example for this, assume a customer has sent a disk that contains several directories in it. You could type: C>COPY A:\. C>COPY A:\FILES C>COPY A:\PRINT etc. or, using XCOPY (DOS 3.0 or later), you can type: C>XCOPY A:\. c:\ /s which will copy all of the files on the root directory of A to C, and the /S option will also copy all files in all of the subdirectories underneath the specified directory (in this case, the whole disk) and, as needed, CREATE the subdirectories on C. |
Answer:
Details:
Product specifications, packaging, technical support and information (*Specifications*) refer to theUnited States retail English version only. Specifications for other versions may vary. All Specifications, claims, features, representations, and/or comparisons provided are correct to the best of our knowledge of the date of publication, but are subject to change without notice.OUR MAXIMUM AGGREGATE LIABILITY TO YOU AND THAT OF OUR DEALERS AND SUPPLIERS IS LIMITED. IT SHALL NOTEXCEED THE AMOUNT YOU PAID TO ACCESS THE INFORMATION. SEE LEGAL DISCLAIMER. |