Locating files throughout a directory tree


/ Published in: Python
Save to your folder(s)

os.walk is a very nice replacement for os.path.walk, which I never did feel comfortable with. There's one very common pattern of usage, though, which still benefits from a simple helper-function; locating all files matching a given file-name pattern within a directory tree.

URL: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/499305

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.