DIAdem Help

Method: GetDrive for FileSystemObject

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

Method: GetDrive for FileSystemObject

Returns a drive object that is associated with a path.

Set oDrive = Object.GetDrive(DriveSpec)
ObjectFileSystemObject
Object with this method
DriveSpecString
Specifies the drive name.
oDriveDrive
Returned object

The following example returns a drive object:

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

Log in to get a better experience