Sorry, I forgot to make a change.  You will need to change "COMPUTER_NAME"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> from win32com.client import GetObject
wmiObj = GetObject("winmgmts:\\\\COMPUTER_NAME\\root\\cimv2")
diskinfo = wmiObj.ExecQuery("Select * from Win32_LogicalDisk")
for disk in diskinfo:
...    print disk.Name, disk.FreeSpace


On 28 Feb 2007 12:26:31 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:

HI,

I am new to Python and wanted to know how to check for the remaining
disk space on my Windows machine using Python? I was thinking of using
the command line "dir" and trying to extract the output from there.
But I'm not sure how to extract command line strings using Python
either.

Anyway help would be appreciated. :)

--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to