Problems to list *all* mountedwindows partitions

J

joblack

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top