FreeSpace Property

 

Description

 

Returns the amount of free space available to a user on the specified drive or network share. Read-only.

 

PowerBASIC Syntax

 

PROPERTY GET FreeSpace () AS VARIANT

 

Return Value

 

VARIANT. The amount of free space.

 

Remarks

 

The value returned by the FreeSpace property is typically the same as that returned by the AvailableSpace property. Differences may occur between the two for computer systems that support quotas.

 

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 free space

STDOUT "Free space: " & FORMAT$(pDrive.FreeSpace \ 1024) & " KBytes"

 

Valid XHTML 1.0 Transitional