Created
February 8, 2021 05:59
-
-
Save paulonteri/51fdd1f509d2e25815dffa63c174c512 to your computer and use it in GitHub Desktop.
number of files in directory and subdirectory
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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