3 messages in com.googlegroups.google-desktop-developerRe: Hard drive usage
FromSent OnAttachments
kurd...@gmail.com10 Dec 2006 18:44 
James [GD Team]12 Dec 2006 10:45 
kurd...@gmail.com14 Dec 2006 01:43 
Subject:Re: Hard drive usage
From:James [GD Team] (j.@google.com)
Date:12/12/2006 10:45:40 AM
List:com.googlegroups.google-desktop-developer

Hello,

There is currently no API function to get the hard disk size.

What you may want to do is create a "FileSystemObject" ActiveX object. Here's a quick example:

var fso = new ActiveXObject("Scripting.FileSystemObject"); var space =fso.GetDrive("c:").AvailableSpace;

"space" will hold the free disk space for drive "c:" in bytes.

Do a google search on FileSystemObject for more information. Many of the examples may be in VBScript, but the properties and methods should be the same.

Cheers! James

kurd@gmail.com wrote:

Hi there. I'm trying to write a gadget to display various information about users hard drive(s). How do I query the computer to display this information? I thought something like: HDspaceLeft=framework.system.device.physicaldisk.size-framework.system.device.physicaldisk.used But I couldn't find anything online to show how to do this. (I'm new to API/javascripting)

Thanks for your help.