ASSIGN


Format:    ASSIGN [(name):] [[(target)}] [LIST] [EXISTS] [DISMOUNT] [DEFER] [PATH]
[ADD] [REMOVE] [VOLS] [DIRS] [DEVICES]  


Template:  NAME,TARGET/M,LISTS/S,EXISTS/S,DISMOUNTS/S,DEFER/S,PATH/S,ADD/S REMOVES/S,
VOLS/S.DIRS/S,DEVICES/S 


Location:  C:

ASSIGN allows the references to files or directories with short, convenient logical device names, rather than their usual names or complete paths. The ASSIGN command can create assignments, remove assignments, or list some or all current assignments

If the (name) and {(target}) arguments are given, ASSIGN assigns the given logical name to the specified target. Each time the assigned logical device name is referred to, AmigaDOS accesses the specified target. If the (name) given is already assigned to a file or directory, the new target replaces the previous one. A colon must be inclided afer the (name) argument.

If only the (name) argument is given, any existing ASSIGN of a file or directory to that logical device is cancelled.

You can assign several logical device names to the same target by using multiple ASSIGN commands.

You can assign one logical device name to several targets bu specifying each file or directory after the (name) argument or by using several ASSIGN commands with teh ADD option. Specifying the ADD option does not replace any existing target assigned to (name). This target is added to the ASSIGN list and the system searches for all the targets when (name) is encountered. If the first target is not available, ASSIGN uses the next target added.

The REMOVE option deletes a target name from the ASSIGN list.

If no arguments are given the ASSIGN or if the LIST keyowrd is used, a list of all current assignments is displayed. If the VOLS, DIRS, or DEVICES switch is specified, ASSIGN limits the display to volumes, directories, or devices.

When the {(target)} argument is given, AmigaDOS immediately looks for that file or directory. If the ASSIGN commands are part of the User-startup, the targets must ne present on a mounted disk during the boot procedure. If the an assigned target cannot be found a requester will apear asking for it. However using the DEFER and PATH options make the system wait until the target is needed before searching for it.

The DEFER option creates a late-binding ASSIGN. This ASSIGN takes effect when the assigned object is first referenced, rather than when the assignment is made. When the DEFER option is used, the disk containing the assigned target is not needed until the object is called. The assignment then remains vaild until explicitly changed.

The PATH option creates a non-binding ASSIGN. A non-binding ASSIGN acts like a DEFERred ASSGn, except that it is re-evaliated each time the assigned name is referenced. For example, if you assign FONTS: to DF0:Fonts with the path option, any disk in DF0: is searched when FONTS: is referenced. As long as the disk contains a Fonts directory, it satisfies the ASSIGN. You cannot assign multiple assigns with the PATh option.

The DISMOUNT option disconnects a volume or device from the list of mounted devices. You must provide the device name in the argument. DISMOUNT removes the name from the list, but does not free resouourses. You cannout cancel a DISMOUNT with out rebooting. DISMOUNT is ment for use by software developers only and can cause a software failure if not used carefully.


Example:

assigns the FONTS: directory Fontdir on Myfonts


Back