|
The VBScript Drive object provides access to the properties of a particular disk drive or network share.
The amount of space available to a user on the specified drive or network share. This property is not currently supported on UNIX. | |
The drive letter of a physical local drive or network share. This property is not currently supported on UNIX. | |
A value indicating the type of a drive. This property is not currently supported on UNIX. | |
The type of file system in use for the drive. This property is non currently supported on UNIX. | |
The amount of free space available to a user on the drive or network share. This property is not currently supported on UNIX. | |
True if the drive is ready, False if not. | |
The file system path for a drive. | |
A Folder object representing the root folder of a drive. | |
The decimal serial number used to uniquely identify the disk volume. This property is not currently supported on UNIX. | |
The network share name of a drive. This property is not currently supported on UNIX. | |
The total space, in bytes, of a drive or network share. This property is not currently supported on UNIX. | |
The volume name of a drive. This property is not currently supported on UNIX. |
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 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.