How do I get the absolute paths of all the files in a directory that could have many sub-folders in Python?
I know os.walk() recursively gives me a list
os.walk()
Try:
import os for root, dirs, files in os.walk('.'): for file in files: p=os.path.join(root,file) print p print os.path.abspath(p) print