Amiga World Official AmigaDOS 2 Companion - eBook-ENG

Page 262

244

AmigaWorld Official AmigaDOS 2 Companion many sources if you wish. The TO argument gives the destination file or direc tory for the copy source. In its simplest form, the command looks like this: COPYfilelTOfile2

This command copies the contents of file 1 to file2. If file2 does not exist be fore you execute Copy, the command creates it. If it does exist, the command overwrites the old contents with the contents of file 1. The system doesn't warn you, so be careful or you'll overwrite an important file. In addition to simple filenames, the FROM and TO arguments can also be pathnames. For example, COPYfilel TO RAM:file2

copies filel from the current directory to a file named file2 on the RAM: disk. You can also use logical names in the FROM and TO arguments: COPY Extras2.0/Devs/Printers/EpsonQTO DEVS:Printers/EpsonQ

copies the EpsonQ printer driver from the Extras2.0 disk to the Printers direc tory of the DEVS: directory.

When you copy a file outside of its directory, you can use the original filename for the destination file by not supplying a filename in the TO pathname. In the above example, you get the same results by entering: COPY Extras2.0/Devs/Printers/EpsonQTO Devs:Printers

This command copies the EpsonQ driver into the destination directory and gives the destination file the same name as the source file. Note also that the TO keyword is optional; as long as you put the FROM argument first and the TO argument second, you can omit the keywords. (I always use the TO key word, however, because it's a good visual clue for what's happening.) If you specify a directory for the FROM argument, Copy copies all the files (not the directories) inside the FROM directory. In this case, the TO argu ment must specify a directory. For example,

COPY System2.0/System TO System2.0/Utilities

copies all the files in the System directory of a hard-drive-equipped Amiga to the Utilities directory. However, COPY System2.0/System TO Utilities/Clock


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.