How to get/read Hard disk label / drive label

P

Praveen

I want to read individual disk label

for Hard disk (C: drive, D: drive disk label)
and
CD-ROM disk label

Please provide some pointer to the code or document.

Thanks in advance.
 
R

Rob Williscroft

Praveen wrote in @h48g2000cwc.googlegroups.com in comp.lang.python:
I want to read individual disk label

for Hard disk (C: drive, D: drive disk label)
and
CD-ROM disk label

Please provide some pointer to the code or document.

You could use:

<url:
http://aspn.activestate.com/ASPN/docs/ActivePython/2.2/PyWin32/win32api__
GetVolumeInformation_meth.html>

which will require:

http://sourceforge.net/projects/pywin32/

Or you can use this:

http://windowssdk.msdn.microsoft.com/en-us/library/ms685899.aspx

with this:

http://docs.python.org/dev/lib/module-ctypes.html

which is built in to python 2.5

Rob.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top