|Navigation: Language Reference > 13 - Built-in Functions >====== SETPATH (change current drive and directory) ======|
|SETPATH||Changes the current drive and directory.|
|path||A string constant or the label of a STRING, CSTRING, or PSTRING variable containing a new drive and/or directory specification.|
SETPATH changes the current drive and directory. If the drive and path entry is invalid, the “Path Not Found” error is posted, and the current directory is not changed.
If the drive letter and colon are omitted from the path, the current drive is assumed. If only a drive letter and colon are in the path, SETPATH changes to the current directory of that drive.
03 Path Not Found
SETPATH('C:\LEDGER') !Change to the ledger directory
SETPATH(UserPath) !Change to the user's directory