Posted By

fnurl on 04/05/09


Tagged

FileSystem


Versions (?)

List files in directory tree


 / Published in: Python
 

  1. for root,dir,files in os.walk(corpusDir):
  2. print "Listing " + root
  3. for file in files:
  4. #print os.path.abspath(os.path.join(root,file))
  5. print os.path.join(root,file)
  6. print str(len(files)) + " files found."

Report this snippet  

You need to login to post a comment.