diskfree

In this category you can exchange your programming questions and solutions.
Post Reply
maurizio
Posts: 6
Joined: Fri Oct 21, 2011 1:14 pm

diskfree

Post: # 776Post maurizio
Fri Nov 18, 2011 4:55 pm

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.

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

diskfree

Post: # 777Post Marco
Sun Nov 20, 2011 4:53 pm

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

Post Reply