DIAdem Help

Property: VolumeName for Drive

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

Property: VolumeName for Drive

Specifies the drive name.

Object.VolumeName
ObjectDrive
Object with this property
Object.VolumeNameString with read and write access

The following example generates a collection of all drives:

Function CreateDriveList
  Dim fso, oMyDrive, oMyDrives, sOutput
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set oMyDrives = fso.Drives
  For Each oMyDrive in oMyDrives
    sOutput = sOutput & oMyDrive.DriveLetter & VBTab 
    If oMyDrive.DriveType = 3 Then
      sOutput = sOutput & oMyDrive.ShareName
    ElseIf oMyDrive.IsReady Then
      sOutput = sOutput & oMyDrive.VolumeName
    Else
      sOutput = sOutput & "[Not ready]"
    End If
    sOutput = sOutput & VBCrLf
  Next
  CreateDriveList = sOutput
End Function

Log in to get a better experience