Problems to list *all* mountedwindows partitions
joblack
tobias.koeck at gmail.com
Thu May 3 11:57:01 EDT 2012
More information about the Python-list mailing list
Thu May 3 11:57:01 EDT 2012
- Previous message (by thread): c-based version of pyPdf?
- Next message (by thread): Algorithms in Python, cont'd
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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?
- Previous message (by thread): c-based version of pyPdf?
- Next message (by thread): Algorithms in Python, cont'd
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list