//单位MB
function getDiskFree(Drive: String): Int64;
var FreeBytes: Int64; TotalBytes: Int64; begin if GetDiskFreeSpaceEx(Pchar(Drive),FreeBytes, TotalBytes, nil) then begin RESULT := FreeBytes; end else begin RESULT := 0; end; RESULT:=RESULT shr 20; end;