Page 1 of 1

diskfree

Posted: Fri Nov 18, 2011 4:55 pm
by maurizio
hi, why the diskfree function back the negative value?
For example in my C: disk result -85716992 (byte), but in the property of my disk result 28.457.164.800 byte used and 29.978.923.008 available byte.

diskfree

Posted: Sun Nov 20, 2011 4:53 pm
by Marco
hi, it is possible you try to pass or calculate four diskfree value into an integer variable. It is to large to fit into an integer variable, you must declare it as a double variable.
dim a as integer
a=diskfree("C") `gives a negative value if it is greater than 2147483647 bytes.

dim a as double
a=diskfree("C") holds the right value

i hope this will help, best regards