Previous PageNext Page

8.7 Drive Object

The Drive object provides access to the properties of a particular disk drive or network share.
 

Properties

AvailableSpace
 
The amount of space available to a user on the specified drive or network share. This property is not currently supported on UNIX.
 
DriveLetter
 
The drive letter of a physical local drive or network share. This property is not currently supported on UNIX.
 
DriveType
 
A value indicating the type of a drive. This property is not currently supported on UNIX.
 
FileSystem
 
The type of file system in use for the drive. This property is non currently supported on UNIX.
 
FreeSpace
 
The amount of free space available to a user on the drive or network share. This property is not currently supported on UNIX.
 
IsReady
 
True if the drive is ready, False if not.
 
Path
 
The file system path for a drive.
 
RootFolder
 
A Folder object representing the root folder of a drive.
 
SerialNumber
 
The decimal serial number used to uniquely identify the disk volume. This property is not currently supported on UNIX.
 
ShareName
 
The network share name of a drive. This property is not currently supported on UNIX.
 
TotalSize
 
The total space, in bytes, of a drive or network share. This property is not currently supported on UNIX.
 
VolumeName
 
The volume name of a drive. This property is not currently supported on UNIX.
 

Remarks

The following code illustrates the use of the Drive object to access drive properties:
 

Sub ShowFreeSpace(drvPath)

Dim fs, d, s

Set fs = CreateObject("Scripting.FileSystemObject")

Set d = fs.GetDrive(fs.GetDriveName(drvPath))

s = "Drive " & UCase(drvPath) & " - "

s = s & d.VolumeName & vbCrLf

s = s & "Free Space: " & FormatNumber(d.FreeSpace/1024, 0)

s = s & " Kbytes"

Response.Write s

End Sub


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page