GetDiskSpace()

Summary

Gets the disk size and the amount of space available in bytes.

Changes

In Version 6.0/2012 the returned values were changed from integer to real numbers.

Syntax

space = GetDiskSpace(string path)

Argument Contents
path A path on the drive for which the space information is needed

Returns

Returns a two-element array of real numbers. The first element is the amount of free space and the second element is the total disk size.

Example

space = GetDiskSpace("c:")

Error Codes

Error Type Meaning
NotFound The path was not found

See Also

Function Summary
GetDrives() Returns a list of disk drives and their type
GetFileInfo() Gets information about a file