Created
February 23, 2018 08:42
-
-
Save slv922/61549eb559a702e6c747d37ec8c92163 to your computer and use it in GitHub Desktop.
recursively get a list of all the files in a directory
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
#!/usr/bin/python | |
import glob | |
import os | |
import sys | |
SRC = sys.argv[1] | |
for root, directories, filenames in os.walk(SRC): | |
for directory in directories: | |
print os.path.join(root, directory) | |
for filename in filenames: | |
print os.path.join(root,filename) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment