DECLARE INTEGER GetDiskFreeSpaceEx IN Win32API; STRING @lpDirectoryName,; STRING @lpFreeBytesAvailableToCaller,; STRING @lpTotalNumberOfBytes,; STRING @lpTotalNumberOfFreeBytes lcdrive = "F:\" STORE REPLICATE(CHR(0), 8) TO lccaller, lctotal, lcfree IF GetDiskFreeSpaceEx(@lcdrive, @lccaller, @lctotal, @lcfree) # 0 ? StringToInteger(lccaller) && Available to caller ? StringToInteger(lctotal) && Total space ? StringToInteger(lcfree) && Free space ENDIF FUNCTION StringToInteger LPARAMETER pcstring, plsigned LOCAL lnresult, lnlast, lni, llsigned,; lnmsb, lnmax lnresult = 0 lnlast = LEN(pcstring) * Return Signed Integer? IF PCOUNT() = 2 llsigned = plsigned ELSE llsigned = .F. ENDIF FOR lni = 1 TO lnlast lnresult = lnresult + ASC(SUBSTR(pcstring, lni, 1)) * (256 ^ (lni - 1)) NEXT IF llsigned lnmsb = (lnlast * 8) - 1 IF BITTEST(lnresult, lnmsb) lnmax = (2 ^ (lnmsb + 1)) lnresult = lnresult - lnmax ENDIF ENDIF RETURN lnresult ENDFUNC