Help needed - To get path of a directory

Tim Golden mail at timgolden.me.uk
Thu Oct 14 09:59:36 CEST 2010


> On 13/10/10 15:26, Bishwarup Banerjee wrote:
>> I want to get the absolute path of the Directory I pass explicitly. Like
>> functionName("\abcd").

On 13/10/2010 05:44, Kingsley Turner wrote:
> One way to achieve this is to fetch a recursive directory list for all
> drives, and then search for your directory_name.endswith("abcd") in each
> list. But what would you do with multiple occurrences ?

[... snip useful code ...]

> I don't know how to enumerate all your windows device letters.

http://timgolden.me.uk/python/win32_how_do_i/find-drive-types.html

TJG



More information about the Python-list mailing list