import os dircnt=0 filecnt=0 for root, dirs, files in os.walk('/home/webdocs/wind2_documents'): dircnt += len(dirs) filecnt += len(files) print dircnt print filecnt
Select allOpen in new window
This would make the solution trivial...