CSplitpath:GetDrive
The GetDrive method returns the drive name, like C:, from a CSplitpath object.
sDrive = CSplitpath:GetDrive() |
|
Suppose a file exists with a full path named sPath. The following script fragment retrieves the drive name component:
|
-- create a CSplitpath object |
|
-- Specify the path to be split |
|
-- assigns the drive name component to the string sDrive. |
|
-- when done with S, remove it from memory |