Property: Item for Drives
- Updated2024-09-12
- 1 minute(s) read
FileSystemObject and Dictionary > Properties > Property: Item for Drives
Property: Item for Drives
Returns a single Drive object. You can use this to access a single drive.
Set oDrive = Object.Item(Key)
| Object | Drives Object with this property |
| Key | Variant Name of drive |
| oDrive | Drive Returned object |
The following example returns the size of drive C:
Dim fso, oMyDrives Set fso = CreateObject("Scripting.FileSystemObject") Set oMyDrives = fso.Drives Call MsgBox(oMyDrives.Item("C").TotalSize)