CURDIR$ function

Purpose

Return the current directory path for the specified drive.

Syntax

s$ = CURDIR$[(drive$)]

Remarks

drive$ is an optional string expression, containing the drive letter of the target disk drive.  If drive$ is not specified or is an empty string, the current directory path is returned for the default drive.

See also

CHDRIVE, CHDIR

Example

FUNCTION PBMAIN

  LOCAL FullCurrentPath$

  LOCAL CurrentDrive$

  FullCurrentPath$ = CURDIR$

  IF MID$(CURDIR$,2,1) = ":" THEN

    CurrentDrive$ = LEFT$(CURDIR$,2)

  END IF

END FUNCTION