This function walks a directory tree starting at a specified root folder, and returns a list of all of the files (and optionally folders) that match our pattern(s).
d returns a list of all of the files (and optionally folders) that match our pattern(s).
The standard match our tree function os.path.walk can be confusing, and is difficult to customize. It can also be slow. Here’s an alternative that allows you to choose the root folder, whether to recurse down through sub-folders, the file pattern to match, and whether to include folder names in the results.
The file pattern is case insensitive and UNIX style. Multiple patterns may be specified; delimit with a semi-colon. Note that this means semi-colons themselves can’t be part of a pattern. Boo-hoo.
Download from: Homepage