Click or drag to resize

CurDrive Function

Return the current Windows drive.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.2a
Syntax
 FUNCTION CurDrive() AS STRING
View Source

Return Value

Type: String
The letter of the current drive, without a trailing colon.
Remarks
Examples
This example illustrates the relationship between CurDrive() and DiskChange() and shows that CurDrive() is unaffected by SetDefault():
X#
FUNCTION DriveTest()
        ? CurDrive()                        // C
        SetDefault("A")
        ? CurDrive()                        // C
        DiskChange("A")
        ? CurDrive()                        // A
        DiskChange("C")
        ? CurDrive()                        // C
See Also