bas7advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
CHDIR Statement Details
  ◄Syntax►  ◄Details►  ◄Example►                 ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
CHDIR changes the current default directory for the specified drive.
 
CHDIR pathname$
    ■ The argument pathname$ must have fewer than 64 characters.
      It has the following syntax:
 
        [drive:][\]]directory[\directory]...
 
    ■ The argument drive: is an optional drive specification. If you
      omit drive, CHDIR changes the default directory on the current drive.
 
Usage Notes
    ■ CHDIR cannot be shortened to CD.
    ■ CHDIR changes the default directory but not the default drive.
      For example, if the default drive is C, the following statement
      changes the default directory on drive D, but C remains the default
      drive:
          CHDIR "D:\TMP"
    ■ Use CURDIR$ to return the current directory and CHDRIVE to change
      the default drive.