xHarbour Reference Documentation > Command Reference |
Sets the default drive and directory.
SET DEFAULT TO [<cPath>]
If <cPath> is omitted, the current drive and directory of the operating system is used as default directory
The SET DEFAULT command specifies the drive and directory where the application creates and saves files. The initial value of <cPath> is the directory from where the xHarbour application is started.
Use the SET PATH command to add additional directories to be searched for files.
Note: The SET DEFAULT command does not change the default directory of the operating system.
See also: | CurDir(), DefPath(), File(), Set(), SET PATH |
Category: | SET commands |
Source: | rtl\set.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example demonstrates the effect of changing the default // drectory of an xHabour application. PROCEDURE Main SET PATH TO ? File( "Customer.dbf" ) // Result: .F. SET DEFAULT TO C:\xhb\data ? File( "Customer.dbf" ) // Result: .T. SET DEFAULT TO C: // define default drive SET DEFAULT TO .. // Change to parent directory SET DEFAULT TO \ // Change to root directory RETURN
http://www.xHarbour.com