FAQ

rbt wrote:
More of an OS question than a Python question, but it is Python related
so here goes:

When I do os.walk('/') on a Linux computer, the entire file system is
walked. On windows, however, I can only walk one drive at a time (C:\,
D:\, etc.). Is there a way to make os.walk() behave on Windows as it
behaves on Linux? I'd like to walk the entire file system at once... not
one drive at a time.

Thanks!
You would need a wrapper to retrieve all logical drives using
win32api.GetLogicalDriveStrings(),check the drive type with
win32file.GetDriveType() and then os.walk() those local fixed drives.

Hth
Uwe

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 7 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMar 9, '05 at 8:41p
activeMar 11, '05 at 9:49a
posts7
users7
websitepython.org

People

Translate

site design / logo © 2022 Grokbase