> Its not clear what exactly the sort criteria is, however have you looked > at the os.walk() function for traversing directory trees? It may be all > you need. it's amazing what the designers of the builtins left for your disposal.