Python - Code to get volume label of CD Drive in Windows?
#1
I've searched, and the python codes I found required dependencies and external modules. Is there any code that will do this without needing them?
Reply
#2
Donwload my old ripper script for windows
http://luemmels-dvd-ripper.googlecode.co...x-0.6B.tar
Inside the windows folder is a batch file called volname.cmd that do exactly what you need.
Regards Hans
Reply
#3
Haha, well I've written commands that do the exact same thing in batch format before, but I don't like dealing with trying to hide the command prompt window and everything, I'd like to keep it all in-house.
Reply
#4
No dice outside of using batch files? Huh
Reply
#5
It seems like this would work:

http://vermeulen.ca/python-win32api.html

Quote:If you need to get the volume label, or some other information about each of these drives you can use the GetVolumeInformation function, like:

t = win32api.GetVolumeInformation("C:\\")

This returns a tupple like:

('MDATA', -590490522, 255, 6, 'FAT32')
Reply

Logout Mark Read Team Forum Stats Members Help
Python - Code to get volume label of CD Drive in Windows?0