Function CurDrive() Foundation
Determines or changes the current drive.
The function is deprecated. Use the function CurDirectory() instead.
CurDrive( [<cDrive>] ) --> cOldDrive
The return value of CurDrive() is a letter indicating the previously set drive. If no argument is passed to the function, it returns the drive letter of the current drive.
The environment function CurDrive() determines or changes the current drive. The argument <cDrive> can be specified as a character from "a"-"z", "A"-"Z" or with a colon "a:"-"z:", "A:"-"Z:". The corresponding drive becomes the current system drive. When a new drive is selected, the function returns a letter for the drive previously set.
Under OS/2, CurDrive() can set a drive which is not ready to run as the current drive without producing a runtime error. A runtime error only occurs when the not ready drive is accessed using a file or environment function.
A runtime error is created under Windows already when the drive specified with <cDrive> is not ready or invalid.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.