DIAdem Help

Method: GetDriveName for FileSystemObject

  • Updated2024-09-12
  • 1 minute(s) read

Method: GetDriveName for FileSystemObject

Returns the part of a path that corresponds with the name of the drive.

sGetDriveName = Object.GetDriveName(Path)
ObjectFileSystemObject
Object with this method
PathString
Specifies the path. The path must neither correspond with an existing folder nor with an existing file.
sGetDriveNameString
Receives the name of the drive.

The following example specifies the filename of a drive in a path:

Function GetDrive(sDrive)
  Dim fso
  Set fso = CreateObject("Scripting.FileSystemObject")
  GetDrive = fso.GetDriveName(sDrive)
End Function

See Also

Objects Overview

Log in to get a better experience