November 22, 2000 - Probing Drives
![]() |
November 22, 2000 Probing Drives Tips: November 2000
Yehuda Shiran, Ph.D.
|
drive object is created using the GetDrive() method of the FileSystemObject object. The syntax is as follows:
GetDrive(letterDrive);
The single parameter, letterDrive, is the given drive name. This method returns the drive object. The following script should create a drive object for f:
<SCRIPT LANGUAGE="JavaScript">
<!--
var fso = new ActiveXObject("Scripting.FileSystemObject");
driveObj = fso.GetDrive("f");
-->
</SCRIPT>
The drive object does not have any methods. Here are the drive object's properties:
| Property | Description |
AvailableSpace | Returns the number of free bytes on the given drive |
DriveLetter | Returns the drive letter of a physical local drive or a shared network |
DriveType | Returns the drive type |
FileSystem | Returns the file system type for the specified drive |
FreeSpace | Returns the number of free bytes on the given drive |
IsReady | Returns the status of the drive |
Path | Returns the path of the given drive |
RootFolder | Returns the folder object of the root folder |
SerialNumber | Returns the unique serial number of the volume |
ShareName | Returns the shared name of a network drive |
TotalSize | Returns the total number of bytes on a specified drive |
VolumeName | Sets or returns the volume name of the specified drive |



