DIAdem Help

Property: IsReady for Drive

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

Property: IsReady for Drive

Checks whether a drive is ready.

Object.IsReady
ObjectDrive
Object with this property
Object.IsReadyBoolean value with read access
The value is True if the drive is ready, otherwise the value is False.

The following example returns the free memory space of all drives. To do this, the example checks whether the drive is ready:

Function CreateDriveSpaceList
   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.IsReady Then
         sOutput = sOutput & FormatNumber(oMyDrive.FreeSpace,0)
      Else
         sOutput = sOutput & "[Not ready]"
      End If
      sOutput = sOutput & VBCrLf
   Next
   CreateDriveSpaceList = sOutput
End Function

Log in to get a better experience