TotalSize Property

 

Description

 

Returns the total space, in bytes, of a drive or network share.

 

PowerBASIC Syntax

 

PROPERTY GET TotalSize () AS VARIANT

 

Return Value

 

VARIANT. The total space in bytes.

 

Example [PowerBASIC]

 

#INCLUDE "windows.inc"

#INCLUDE "scrrun.inc"

 

DIM fso AS IFileSystem

DIM pDrive AS IDrive

 

' Create an instance of the FileSystemObject

fso = NEWCOM "Scripting.FileSystemObject"

' Get a reference to the IDrive interface

pDrive = fso.GetDrive(UCODE$("C:"))

' GET and display the total size

STDOUT "Total size: " & FORMAT$(pDrive.TotalSize \ 1024) & " KBytes"

 

Valid XHTML 1.0 Transitional