Amiga World Official AmigaDOS 2 Companion - eBook-ENG

Page 231

Delving into AmigaDOS

213

The Assign command's template is:

NAME,TARGET/M,UST/S,EXISTS/S,DISMOUNT/S, DEFER/S,PATH/S,ADD/S,REMOVE/S,VOLS/S, DIRS/S,DEVICES/S

To make a logical assignment, you first enter the name you want to use, fol lowed by the name of a physical directory. For example, to assign the name Pics: to the Work:Pictures directory, enter: ASSIGN PICS: WorlcPictures

The logical name must end with a colon and be separated from the physical pathname by a space. From the template, you'll note that the TARGET argu ment has a /M modifier. This means that you can assign the same logical name to different physical directories. For example, if you have another directory on Work named Graphics that also has a lot of picture files, you might want to use the following:

ASSIGN PICS: Work:Pictures Work:Graphics

Whenever you refer to Pics: from AmigaDOS or a program, AmigaDOS will check the first directory listed; If it can't find the required information, it checks the second directory. If you had already made one assignment for Pics:, you don't have to reenter that assignment to add another directory. With Pics: already assigned to Work:Pictures, you can add the Work:Graphics directory using the ADD/S argument: ASSIGN PICS: Work:Graphics ADD Contrary to Commodore's documentation, the Assign command does not take a SUB argument that lets you subtract one of the physical directories assigned to a logical directory. You can, however, erase an assignment by making a new one or by using the REMOVE/S keyword. For example, the following erases the assignment for Pics:. ASSIGN PICS: REMOVE

You can also remove volumes and devices from the assignment list using the DISMOUNT/S argument. Removing a disk drive from the list of devices means that you'll be unable to access the disk from the Shell, although it will still be available through Workbench. Using DISMOUNT/S doesn't save any system resources. Refrain from using it.

When you assign a name to a physical directory, Assign tries to make sure that the directory exists. If the directory is on a disk that is not mounted, Assign asks you to insert the disk so that it can confirm the directory's presence. To


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