How to get volume name under Win32?

Emile van Sebille emile at fenx.com
Thu May 18 19:42:42 EDT 2000


Dale,

It seems this came up recently with a legitimate way of getting
directly to the label using win32 extensions, so you may want
to look for that, but in the meantime, this gets you there with
a little parsing:

import os
info = os.popen(r'dir x:\missing.ext').readlines()
info[1]

or at least here on win95 info[1] holds the volume name.

HTH,

Emile van Sebille
emile at fenx.com

Dale Strickland-Clark <dale at out-think.NOSPAMco.uk> wrote in message
news:<8g1tn6$cf2$1 at supernews.com>...
> I can't find a function that'll tell me the volume name for a given
drive
> letter - on NT / Win2000
>
> Can anyone help?
>
> Thanks
>
> --
> Dale Strickland-Clark
> Out-Think Ltd, UK
>
>
>
> --
> http://www.python.org/mailman/listinfo/python-list
>







More information about the Python-list mailing list