Define a search path (like a VMS logical name).
- Parameters:
-
[in] | NAME | name of path to define |
[in] | PATH1 | First directory/path to associate with NAME |
[in] | PATH2 | Second directory/path to associate with NAME |
[in] | PATHS | array of paths to associate with NAME; alternative to specifying PATH1, PATH2 etc. NAME |
[in] | DEFAULT | modify the default path (known as $PATH) |
[in] | SHOWALL | List contents of path NAME |
[in] | APPEND | append values to path NAME |
[in] | PREPEND | prepend values to path NAME |
- Returns:
- Stringarray of paths in NAME
Searchpaths are lists of directories and allow files to be located easily via the syntax "SOME_NAME:file.dat" The path is expanded automatically by commands such as GET using the TRANSLATE_PATH command, which can also be used separately to test paths. Searchpaths can reference other searchpaths and are translated recursively. If you wish to reference another searchpath remember to add a : or it will be treated as a normal directory name. For example
- SEARCHPATH "place1" "c:\\place1" "c:\\place1_old"
- SEARCHPATH "mydata" "place1:" "c:\\data2" "$archive:"
There are some special pre-defined searchpaths:
- $DISKDIR is the directory specified by the SET/DISK and SET/DIR commands
- $ARCHIVE is the ISIS data archive ("\\isis\inst$" etc. and "data.isis.rl.ac.uk")
- $PATH is the directories used for filename generated by the ASSIGN command
filenames generated by ASSIGN will be named "$PATH:file.ext". The default value of $PATH is to search the current directory, $DISKDIR and finally $ARCHIVE. Use SEARCHPATH/DEFAULT to set the value of $PATH. To see the contents of all paths use SEARCHPATH/SHOWALL or for individul paths
- PRINTN SEARCHPATH("mydata") to show path "mydata"
- PRINTN SEARCHPATH:DEFAULT() to show $PATH
- SEARCHPATH/DEFAULT "c:\\data" "$diskdir:" "$archive:"
- See also:
- TRANSLATE_PATH