Changes the current drive or directory.

Syntax

CD [<path>]

<path>

The new drive and/or path. Quotes (single or double) are required if the path contains spaces or other special characters; optional otherwise.

Description

Use CD to change the current working directory in dBASE Plus to any valid drive and path. If you're unsure whether a drive is valid, use VALIDDRIVE( ) before issuing CD. The current directory appears in the Navigator.

CD supports the Universal Naming Convention (UNC), which starts with double backslashes for the resource name, for example:

\\MyServer\MyVolume\MyDir\MySubdir

CD without the option <path> displays the current drive and directory path in the result pane of the Command window. To get the current directory, use SET("DIRECTORY").

Another way to access files on different directories is with the command SET PATH. You can specify one or more search paths, and dBASE Plus uses these paths to locate files not on the current directory. Use SET PATH when an application's files are in several directories.

CD works like SET DIRECTORY, except SET DIRECTORY TO (with no argument) returns you to the HOME( ) directory, instead of displaying the current directory.