[python-win32] Volume Serial Number

Tim Golden mail at timgolden.me.uk
Fri May 16 19:45:05 CEST 2008

Rickey, Kyle W wrote:
> How do I get the volume serial number for a drive? For example in the 
> cmd prompt issuing this:

WMI to the rescue?

import wmi

for volume in wmi.WMI ().Win32_LogicalDisk ():
   print volume.Caption, "=>", volume.VolumeSerialNumber



More information about the python-win32 mailing list