DIAdem Help

Property: Drive for File

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

Property: Drive for File

Returns the Drive object for a file. You can use this to access the associated drive.

Set oDrive = Object.Drive
ObjectFile
Object with this property
oDriveDrive
Returned object

The following example returns the drive of a file:

Function FileDrive(sFile)
  Dim fso, oMyFile
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyFile = fso.GetFile(sFile)
  FileDrive = "Path: " & oMyFile.Drive
End Function

Log in to get a better experience