Function Reference


Retrieves the file allocation size on disk

#include <WinAPIFiles.au3>
_WinAPI_GetFileSizeOnDisk ( $sFilePath )


$sFilePath The name of the file to retrieve allocation size.

Return Value

Success: The allocation size, in bytes.
This value is a multiple of the sector or cluster size of the specified physical device.
Failure: 0, call _WinAPI_GetLastError() to get extended error information.


#include <WinAPIFiles.au3>

Local Const $sFile = @ScriptFullPath

ConsoleWrite('Localtion:    ' & $sFile & @CRLF)
ConsoleWrite('Size:         ' & FileGetSize($sFile) & @CRLF)
ConsoleWrite('Size on disk: ' & _WinAPI_GetFileSizeOnDisk($sFile) & @CRLF)