Returns the free disk space of a path in Megabytes.
DriveSpaceFree ( "path" )
path | Path of drive to receive information from. |
Success: | the free disk space in Megabytes as a float number. |
Failure: | 0 and sets the @error flag to 1. |
DriveSpaceFree() may even work when a complete directory path (that exists) is given. However, a file path won't work.
Use the Round() function if the return value is too precise.
DriveGetDrive, DriveGetFileSystem, DriveGetLabel, DriveGetSerial, DriveGetType, DriveSetLabel, DriveSpaceTotal, DriveStatus
#include <MsgBoxConstants.au3>
Local $iFreeSpace = DriveSpaceFree(@HomeDrive & "\") ; Find the free disk space of the home drive, generally this is the C:\ drive.
MsgBox($MB_SYSTEMMODAL, "", "Free Space: " & $iFreeSpace & " MB")