GetDriveInfo
GetDriveInfo
Returns a DriveInfo object for the specified drive.
Syntax
FileSystem.DriveInfo(Drive)
Parameters
Drive |
String, input |
|
Name and path of the file. |
Remarks
DriveInfo Properties |
||
AvailalbleFreeSpace (Integer) |
Indicates the amount of available free space on a drive, in bytes. |
|
DriveFormat (String) |
Gets the name of the file system, such as NTFS or FAT32. |
|
DriveType (Integer) |
Gets the drive type, such as CD-ROM, removable, network, or fixed. |
|
IsReady (Boolean) |
Gets a value that indicates whether drive is ready. |
|
Name (String) |
Gets the name of the drive, such as C:\. |
|
RootDirectory (String) |
Gets the root directory of a drive. |
|
TotalFreeSpace (Integer) |
Gets the total amount of free space available on a drive, in bytes. |
|
TotalSize (Integer) |
Gets the total size of storage space on a drive, in bytes. |
|
VolumeLabel (String) |
Gets or sets the volume label of a drive. |
Example
This example obtains a DriveInfo object for the specified drive and uses it to display information about the drive:
Sub Main()
getInfo = FileSystem.GetDriveInfo("C:\")
MsgBox "The drive type is " & getInfo.DriveType
MsgBox "The drive has " & getInfo.TotalFreeSpace & " bytes free."
MsgBox "The total size of the drive is: " & getInfo.TotalSize
End Sub