Jump to content

Recommended Posts

Posted

Hi,

I have an imputbox which when you click the browse buton you can choose a directory - then when you click ok, the inputbox is automatically updated with the directory you chose which works fine, but id like to display a lable of the freespace of that folder in MB.

I think i need to do this using drivespacefree but im not sure exactly what i need to do, can anyone help please?

thanks

Posted (edited)

Hi, thanks for the reply - works gr8. Just 1 question, how do I round it so there isnt a long decimal?

thanks

EDIT:

I changed the line of code to read

$SPACEDETECTEDRESULT = GUICtrlCreateLabel($FREESPACEONDRIVE /1024 & " GB", 220, 400, 170, 22)
which works and displays the correct number 134 in my case, but there are loads of numbers behind the decimal point. how can i get rid of them?

thanks

Edited by am632
  • 3 weeks later...
Posted

If you want there to be decimal places, use Round($FREESPACEONDRIVE /1024, 2) ; 2 meaning 2 decimal places.

What would be the final full code?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...