Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Problems to list *all* mountedwindows partitions

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


tobias.koeck at gmail

May 3, 2012, 8:57 AM

Post #1 of 1 (165 views)
Permalink
Problems to list *all* mountedwindows partitions

I do have a script which shows me the mounted partitions:

c = wmi.WMI ('localhost')
for disk in c.Win32_DiskPartition (DriveType=3):
diskspace = int(disk.FreeSpace)/1000000
if diskspace < mfspace:
trigger = True
ldisks.append(disk.Name +'\\
'+str('{0:,}'.format(diskspace).replace(",", "."))+' MByte\t
*LOW_DISK_SPACE*')
else:
ldisks.append(disk.Name+'\\
'+str('{0:,}'.format(diskspace).replace(",", "."))+' MByte\t *OK*')

Unfortunetly it only shows partitions mounted to a character (e.g. c:
d:).

There is another physical partition mounted in d:\www1 which isn't
shown. Any idea how to add those partitions as well?
--
http://mail.python.org/mailman/listinfo/python-list

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.