xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

SET PATH

Set the search path for opening files.

Syntax

SET PATH TO [<cDirectoryList>]

Arguments

TO <cDirectoryList>
The <cDirectoryList> parameter specifies one or more directories to search for files when they are not found. A single directory in the list may contain a drive letter, followd by a colon, and subdirectories prefixed with a backslash. individual directories in <cDirectoryList> are separated with semicolons. <cDirectoryList> can be specified as a string literal or as a character expression enclosed in parentheses.

If <cDirectoryList> is omitted, the current drive and directory of the operating system is used as default.

Description

The SET PATH command defines an additional search path for opening files when they cannot be found. This affects databases and associated files.

Files are searched in the following order:

1) The current directory of the operating system.

2) The SET DEFAULT directory.

3) The directories specified with SET PATH.

Note that low-level file functions like FOpen() do not use SET PATH or SET DEFAULT for searching files.

Info

See also:CurDir(), Set(), SET DEFAULT
Category: SET commands
Source:rtl\set.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// The example demonstrates how to define a search path

   // single directory
   SET PATH TO D:\xhb\apps\

   // multiple directories
   SET PATH TO "D:\xhb\apps\;D:\xhb\data\;"

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe