The code below works perfectly.
Could someone please tell me what unit the totalfree is measured in?
I am presuming it is Kilobytes? If it is in Bytes, could someone please tell me how many Bytes in 20Mb (is it 20971520) ?
[code] Declare Function GetDiskFreeSpaceExW Lib “Kernel32” (dirname As WString, ByRef freeBytesAvailable As UInt64, _
ByRef totalbytes As UInt64, ByRef totalFreeBytes As UInt64) As Integer
Dim userfree, totalsize, totalfree As UInt64
Call GetDiskFreeSpaceExW(App.ExecutableFile.Parent.AbsolutePath, userfree, totalsize, totalfree)
if totalfree < 20480 then
MsgBox(“This drive appears to have less than 20Mb of free space available!”)
Thank you all in advance.