How can I see total drive space in my pc?
March 30, 2008 10:05 AM Subscribe
Can anyone help with a program to show total drive space in a PC across multiple drives?
I would like to be able to see total available and free space across the 5 seperate hard drives in my Windows Vista system. It can obviously be done through My Computer and a calculator but is there a software solution (preferably freeware or open source) that can do the job. All the programs I can find through the usual means show folder sizes, percentage free etc but always for ONLY 1 drive. I
I would like to be able to see total available and free space across the 5 seperate hard drives in my Windows Vista system. It can obviously be done through My Computer and a calculator but is there a software solution (preferably freeware or open source) that can do the job. All the programs I can find through the usual means show folder sizes, percentage free etc but always for ONLY 1 drive. I
xla76: "' Save this as space.vbs..."
That is one of the best things ever.
posted by aerotive at 6:49 PM on March 30, 2008
That is one of the best things ever.
posted by aerotive at 6:49 PM on March 30, 2008
Response by poster: 2 excellent replies, but had to give best to the vbs as so simple yet brilliant and elegant. Thanks guys
posted by mrbenn at 10:39 PM on March 30, 2008
posted by mrbenn at 10:39 PM on March 30, 2008
This thread is closed to new comments.
'---8<>
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk where description='Local Fixed Disk'",,48)
For Each objItem in colItems
count = count + 1
size = size + Int(objItem.Size/1048576)
freespace = freespace + Int(objItem.FreeSpace/1048576)
Next
wscript.echo "Total Size: " & size & " MB" & vbcrlf & "Free Space: " & freespace & " MB" & vbcrlf & " (in " & count & " partitions)"
'---8<----------------------->
posted by xla76 at 10:22 AM on March 30, 2008 [2 favorites]