![]() |
![]() |
![]() |
|
![]() | |
![]() |
![]() |
![]() |
![]() |
![]() |
Log In | Not a Member? |
Support
![]() |
![]() |
SYNTAX Directory [directory | -q] DESCRIPTION The Directory command sets or writes the current directory. You can set a new current directory by using the directory parameter. If you omit this parameter, Directory writes the current directory to standard output.
Note INPUT None OUTPUT None, unless you omit the directory parameter. In this case, Directory writes the current directory to standard output. ALIAS RESOLUTION Aliases are resolved in the path specified by the directory parameter. STATUS
Directory can return the following status codes:
PARAMETERS directory Sets the default directory to directory. If you specify directory as a leafname (that is, the final portion of a full pathname), the MPW Shell searches for the directory in the current directory path (for example, searching "{MPW}Examples:" for CExamples). However, if the MPW Shell fails to find the directory in the current directory path, it searches the directories listed in the {DirectoryPath} MPW Shell variable, which contains a list of directories to be searched in order of precedence. The last example illustrates how to do this. OPTIONS -q Inhibits quoting the directory pathname written to standard output. This option applies only if you omit the directory parameter. Normally the MPW Shell quotes the current default directory name if it contains spaces or other special characters. EXAMPLES By omitting the directory parameter, the following command line writes the pathname of the current directory to standard output: Directory The following command line sets the default directory to the folder Examples in the folder MPW on the volume HD. Note that the final colon is optional. Directory HD:MPW:Examples: The following sets the default directory to the volume Reports. Note that volume name specifications must end in a colon. Directory Reports: Omitting the topmost directory causes the command line Directory :Include:Pascal: to set the default directory to the Pascal folder in the Include folder contained in the current default directory. The following script demonstrates how to use Set in conjunction with Directory to specify a list of directory paths to search. According to the {DirectoryPath} MPW Shell variable set in the first line, whenever you execute a Directory command, the MPW Shell searches directories in the following order: first, the current directory (:), then the {MPW} directory, and finally the "{MPW}Projects:" directory. Note that you cannot leave spaces between the comma-separated directories.
Set DirectoryPath ":,{MPW},{MPW}Projects:" If the Tools directory does not exist in your current directory, the MPW Shell finds it in {MPW} and sets the directory to "{MPW}Tools:". SEE ALSO
|