# Function Reference

# _WinAPI_GetDiskFreeSpaceEx

Retrieves information about the amount of space that is available on a disk volume

#include <WinAPIFiles.au3>
_WinAPI_GetDiskFreeSpaceEx ( $sDrive )

## Parameters

$sDrive | The drive to retrieve information, in the format D:, E:, etc.

## Return Value

Success: | The array containing the following information: [0] - The total number of available free bytes on a disk. If per-user quotas are being used, this value may be less than the total number of free bytes on a disk. [1] - The total number of available bytes on a disk. If per-user quotas are being used, this value may be less than the total number of bytes on a disk. [2] - The total number of free bytes on a disk.
Failure: | Sets the @error flag to non-zero, call _WinAPI_GetLastError() to get extended error information.

## See Also

Search GetDiskFreeSpaceEx in MSDN Library.

## Example

    #include <WinAPIFiles.au3>

    Local $aData = _WinAPI_GetDiskFreeSpaceEx(@HomeDrive)

    ConsoleWrite('Total available free space on ' & @HomeDrive & ' => ' & $aData[0] & ' bytes' & @CRLF)
    ConsoleWrite('Total available space on ' & @HomeDrive & ' => ' & $aData[1] & ' bytes' & @CRLF)
    ConsoleWrite('Total free space on ' & @HomeDrive & ' => ' & $aData[2] & ' bytes' & @CRLF)