Retrieves the free disk space of the drive which contains the specified path, in megabytes.
DriveSpaceFree, OutputVar, Path
The variable in which to store the result, which is rounded down to the nearest whole number.
Any path contained by the drive (might also work on UNC paths and mapped drives).
OutputVar is set to the amount of free disk space in Megabytes (rounded down to the nearest Megabyte).
In general, Path can be any path. Since NTFS supports mounted volumes and directory junctions, different paths with the same drive letter can produce different amounts of free space.
Retrieves the free disk space of the C drive and stores it in FreeSpace.
DriveSpaceFree, FreeSpace, C:\
Retrieves and reports the free disk space of the drive which contains A_MyDocuments.
DriveSpaceFree, FreeSpace, % A_MyDocuments MsgBox % FreeSpace " MB"