Funktionreferenz


_WinAPI_GetDiskFreeSpaceEx


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

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

Parameter

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

Rückgabewert

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.

Bemerkungen

None.

Siehe auch

Suche nach GetDiskFreeSpaceEx in der MSDN Bibliothek.

Beispiel

#include <WinAPIFiles.au3>

Local $aData = _WinAPI_GetDiskFreeSpaceEx(@HomeDrive)

ConsoleWrite('Gesamter verfügbarer freier Speicher auf ' & @HomeDrive & ' => ' & $aData[0] & ' bytes' & @CRLF)
ConsoleWrite('Gesamter verfügbarer Speicher auf ' & @HomeDrive & ' => ' & $aData[1] & ' bytes' & @CRLF)
ConsoleWrite('Gesamter freier Speicher auf ' & @HomeDrive & ' => ' & $aData[2] & ' bytes' & @CRLF)