Chris,

I like your suggestion too. What is the minimum IE or OS version supported using this method?

I made a couple changes, but only for my own preference, other users may not agree.

Removed the Kbytes as MB or GB might be a better term, but I did not want to add code to change name. Numbers alone should be good enough.
Added $objFSO="" to destroy the object at the end of the code
Added another var for the drive to use.
Removed the term Available, as Freespace and Available seem to be the same. Can you explain the difference between the two?
Posted with PostPrep to make copying the code from the board much easier to use.



Break On
$Drive='c:'
$objFSO = CreateObject("Scripting.FileSystemObject")
$objDrive = $objFSO.GetDrive("$Drive")
"Drive " + $objDrive.DriveLetter + ": "+ $objDrive.VolumeName ?
"Total Size: " + FormatNumber($objDrive.TotalSize/1024, 0) ?
"Free Space: " + FormatNumber($objDrive.FreeSpace/1024, 0) ?
$objFSO=""



Here is an example of the returned value for me.

quote:

Drive C: Local Disk
Total Size: 70,332,570
Free Space: 8,350,456

Drive D:
Total Size: 117,218,240
Free Space: 58,923,272

Chris, also a minor observation. Notice my drives above. C: says Local Disk but the D: drive does not say Local Disk. Both are physical hard drives, not extended partitions. I have two drives on the system. Why doesn't D: say Local Disk?

[ 17. April 2003, 19:10: Message edited by: NTDOC ]