Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript Drive Object

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

Properties: VBScript Drive Object

VBScript Drive Object AvailableSpace Property

The amount of space available to a user on the specified drive or network share. This property is not currently supported on UNIX.

VBScript Drive Object DriveLetter Property

The drive letter of a physical local drive or network share. This property is not currently supported on UNIX.

VBScript Drive Object DriveType Property

A value indicating the type of a drive. This property is not currently supported on UNIX.

VBScript Drive Object FileSystem Property

The type of file system in use for the drive. This property is non currently supported on UNIX.

VBScript Drive Object FreeSpace Property

The amount of free space available to a user on the drive or network share. This property is not currently supported on UNIX.

VBScript Drive Object IsReady Property

True if the drive is ready, False if not.

VBScript Drive Object Path Property

The file system path for a drive.

VBScript Drive Object RootFolder Property

A Folder object representing the root folder of a drive.

VBScript Drive Object SerialNumber Property

The decimal serial number used to uniquely identify the disk volume. This property is not currently supported on UNIX.

VBScript Drive Object ShareName Property

The network share name of a drive. This property is not currently supported on UNIX.

VBScript Drive Object TotalSize Property

The total space, in bytes, of a drive or network share. This property is not currently supported on UNIX.

VBScript Drive Object VolumeName Property

The volume name of a drive. This property is not currently supported on UNIX.

Remarks: VBScript Drive Object

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.