| **Navigation:**  [[introduction.htm|Language Reference]] > 13 - Built-in Functions >====== SETPATH (change current drive and directory) ====== | [[setnulls set the null state of columns .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[setpencolor set line draw color .htm|{{btn_next_n.gif|Next page}}]] | | || **SETPATH(**//path//**)** {{blk2blue.jpg|blk2blue.jpg}} | **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. **Errors Posted:** 03     Path Not Found **Example:** **SETPATH('C:\LEDGER')     !Change to the ledger directory** **SETPATH(UserPath)        !Change to the user's directory** **See Also:** [[path return current directory .htm|PATH]] [[shortpath return short filename .htm|SHORTPATH]] [[longpath return long filename .htm|LONGPATH]] [[directory get file directory .htm|DIRECTORY]] [[filedialoga extended file dialog .htm|FILEDIALOG]]