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

 

VBScript Folder Object Size Property

Returns the size, in bytes, of all files and subfolders contained in the folder.

Syntax: VBScript Folder Object Size Property

object.Size

Arguments: VBScript Folder Object Size Property

object

A Folder object.

Remarks: VBScript Folder Object Size Property

The following code illustrates the use of the Size property with a Folder object:

Sub ShowFolderSize(filespec)

Dim fs, f, s

Set fs = CreateObject("Scripting.FileSystemObject")

Set f = fs.GetFolder(filespec)

s = UCase(f.Name) & " uses " & f.size & " bytes."

Response.Write s, 0, "Folder Size Info"

End Sub

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