Property: IsReady for Drive
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: IsReady for Drive
Property: IsReady for Drive
Checks whether a drive is ready.
Object.IsReady
| Object | Drive Object with this property |
| Object.IsReady | Boolean 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