Skip to content

Instantly share code, notes, and snippets.

@paulonteri
Created February 8, 2021 05:59
Show Gist options
  • Save paulonteri/51fdd1f509d2e25815dffa63c174c512 to your computer and use it in GitHub Desktop.
Save paulonteri/51fdd1f509d2e25815dffa63c174c512 to your computer and use it in GitHub Desktop.
number of files in directory and subdirectory
total = 0
for root, dirs, files in os.walk("."):
total += len(files)
print(total)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment