Home > Language Reference > System Functions > DiskFree

DiskFree

The DiskFree function returns the available space on the specified resource.

Syntax

var = DiskFree(<resource_name>)

Parameters

<resource_name>. string, name of the resource, drive letter. It cannot be a UNC name.

Return value

var, integer, available space (in Kbytes) on the resource. If the function fails, the return value is 0 and script execution stops (unless #IgnoreErrors is set to 1).

Example

var = DiskFree("F:") 'returns the available space on the disk F