[AmigaOS / ApolloOS Command Reference\Path] 
 

PATH

Format: PATH [{<dir>}] [ADD] [SHOW] [RESET] [REMOVE] [QUIET] Template: PATH/M, ADD/S, SHOW/S, RESET/S, REMOVE/S, QUIET/S Purpose: To control the directory list that the Shell searches to find commands. Path: Internal Specification: PATH lets you see, add to, or change the search path that AmigaDOS follows when looking for a command or program to execute. When a directory is in the search path, you no longer need to specify the complete path to any files or subdirectories within that directory. You can simply enter the filename, and AmigaDOS will look through the directories in the search path until it finds the file. Enter the PATH command alone, or with the SHOW option, and the directory names in the current search path will be displayed. Normally, when PATH is displaying the directory names, a requester will appear if a volume that is part of the search path cannot be found. For example, if you added a floppy disk to the search path, then removed that disk from the disk drive, a requester would ask you to insert the disk. If you specify the QUIET option, PATH will not display requesters for volumes that are not currently mounted. If PATH encounters an unmounted volume, it will simply display the volume name. The names of any directories on that volume included in the PATH will not be displayed. The ADD option specifies directory names to be added to the current PATH. You can add up to ten directories with one PATH ADD command (the ADD keyword is optional); names of the directories must be separated by at least one space. When you issue the PATH command, AmigaDOS searches for each of the ADDed directories. To replace the existing search path with a completely new one, use PATH RESET followed by the names of the directories. The existing search path, except for the current directory and SYS:C, is erased and the new one is substituted. The REMOVE option eliminates the named directory from the search path. Example: 1> PATH EXTRAS:Tools ADD Adds the Tools directory on the Extras disk to the search path of the Shell. If the Extras disk is not in a disk drive, a requester will ask you to insert it in any drive. If you remove Extras from the drive, and enter: 1> PATH A list of directories in the search path will be displayed. A requester will ask you to insert Extras. However, if you enter: 1> PATH QUIET The list of directories in the search path will be displayed. However, when the path comes to Extras:Tools, only the volume name, Extras:, will appear in the list. See also: ASSIGN