Description
The DiskFree
function returns the available space on the specified resource.
Syntax
var = DiskFree(<resource_name>)
Parameter
<resource_name>
, string constant or variable. It’s a disk letter (it can’t be a UNC path).
Return Value
var
, numeric, available space (in Kbytes) on the resource; 0 if <resource_name>
is not found or if there is no more space on the disk. If the disk does not exist, an error message is displayed and all the scripts are stopped if #IgnoreErrors=0
(value by default). If #IgnoreErrors=1
, the returned value is 0 when an error is detected at execution.
Example
var = DiskFree("F:") 'returns the available space on the disk F