Command SET PATH Foundation

Specifies the list of directories to search when opening files.

Syntax
SET PATH TO [<cPath>]
Scope
thread-local
Parameters
<cPath>
<cPath> is a list of directories (the path) to be searched when opening files that are not found in the current directory. The path can be specified as literals or as character expressions in parentheses. The semicolon can be used as the separating character between individual directory names. The semicolon can be used as a line continuation character only when <cPath> is specified in parentheses. If SET PATH TO is executed without argument, the previously defined path is removed and file searches will be performed only in the default directory specified using SET DEFAULT.
Description

The command SET PATH defines the list of directories an Xbase++ application searches for files to open. A file is searched for first in the default directory specified with SET DEFAULT and then in the path specified in the directory list of SET PATH. The low level file functions are an exception. For example, FOpen() and FErase() require that the complete file name be specified, including the drive and path, unless the file is found in the current directory.

When new files are to be created in another directory or on another drive, either the desired directory is set using SET DEFAULT or the complete file name including the drive and directory is specified.

Examples
SET PATH
// The example shows different ways to call SET PATH TO. 

PROCEDURE Main 

   SET PATH TO C:\XPP\APPS\SALES;C:\XPP\APPS\STOCK 

   SET PATH TO ( "D:\PERSONAL\INCOME;D:\PERSONAL\TAXES;" + ; 
                 "D:\PERSONAL\ADDRESS;D:\PERSONAL\BANK" ) 
   SET PATH TO 

RETURN 
Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.