fso.GetDrive( Drive Specification );
GetDrive method of FileSystemObject accepts 1 parameter as drive specification or UNC shared name of drive and returns the Drive object. Further Drive object returned by the GetDrive function provides the access to various properties associated with memory Drives of computer system of client.
You can pass the drive letter specification or UNC share name to the GetDrive function e.g.: "C" or "\\my-computer\c"
Following are the properties of Drive object returned by GetDrive method:
- AvailableSpace: returns the available free space on the specified drive.
- DriveLetter: returns the uppercase drive letter of associated with specified local drive or network share.
- DriveType: returns the type of specified drive whether it is fixed hard disk, CD drive etc.
- FileSystem: returns the file system of specified drive.
- FreeSpace: returns the amount of free space available on the specified drive or network share.
- IsReady: returns Boolean value i.e. true or false based on the state of specified drive. It checks whether the drive is ready to use or not.
- Path: returns the uppercase drive letter followed by colon that specifies the path name for the drive.
- RootFolder: returns the folder object representing the root folder of specified drive or network share.
- SerialNumber: returns the serial number of the specified drive.
- ShareName: returns the network shared name of the specified UNC share.
- TotalSize: returns the total size of the specified drive.
- VolumeName: returns the drive volume label of the specified drive.