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

 

VBScript Drive Object TotalSize Property

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

Syntax: VBScript Drive Object TotalSize Property

object.TotalSize

Arguments: VBScript Drive Object TotalSize Property

object

A Drive object.

Remarks: VBScript Drive Object TotalSize Property

The following code illustrates the use of the TotalSize property:

Sub ShowSpaceInfo(drvpath)

Dim fs, d, s

Set fs = CreateObject("Scripting.FileSystemObject")

Set d = fs.GetDrive(fs.GetDriveName(fs.GetAbsolutepathname(drvpath)))

s = "Drive " & d.DriveLetter & ":"

s = s & vbCrLf

s = s & "Total Size: " & FormatNumber(d.TotalSize/1024, 0) & " Kbytes"

s = s & vbCrLf

s = s & "Available: " & FormatNumber(d.AvailableSpace/1024, 0) & " Kbytes"

Response.Write s

End Sub

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.