Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A python script to recursively list all files in a given directory, newline separated
#!/usr/bin/python
import os
import sys
def listdir(d):
if not os.path.isdir(d):
print d
else:
for item in os.listdir(d):
listdir((d + '/' + item) if d != '/' else '/' + item)
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'Usage: listall DIR'
else:
listdir(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.