Skip to content

Instantly share code, notes, and snippets.

@ahmedshahriar
Created February 13, 2021 19:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedshahriar/163870829afd2518f37c95540c7cacc2 to your computer and use it in GitHub Desktop.
Save ahmedshahriar/163870829afd2518f37c95540c7cacc2 to your computer and use it in GitHub Desktop.
This will print the folders and files inside a directory
# input
import os
for dirname, _, filenames in os.walk('/files/input'):
for filename in filenames:
print(os.path.join(dirname, filename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment