GETDISKSPACE

Action

Returns the number of kilobytes (KB) available to the current user on a specific drive.

 

Syntax

GETDISKSPACE ("drive")

 

Parameter

Drive

String that specifies a directory on the disk of interest. On Windows NT and on Windows 95 OSR2 and later versions, this string can be a UNC name. If this parameter is a UNC name, you must follow it with an additional backslash. For example, you would specify \\MyServer\MyShare as \\MyServer\MyShare\.

If Drive is an empty string, GetDiskSpace obtains information about the disk that contains the current directory.

On Windows NT and on Windows 95 OSR2 and later versions, Drive does not have to specify the root directory on a disk. On these platforms, the function accepts any directory on a disk.

Returns

A number representing the number of kilobytes (KB) available to the current user on the drive specified.

Remarks

On Windows 95 OSR1 and earlier versions, the function can only return correct values for volumes that are smaller than 2 gigabytes in size. On Windows NT and Windows 95 OSR2 and later versions, the function always returns correct values, regardless of the size of the volume.

 

Examples

$Result = GetDiskSpace( "C:\" )

 

$Result = GetDiskSpace( "X:\MARKETING" )