May-09-2018, 01:12 AM
I have this code:
import os def scanRecurse(baseDir): for entry in os.scandir(baseDir): if entry.is_file(): yield entry.name else: yield from scanRecurse(entry.path) for i in scanRecurse('D:\\App Back-Ups'): print(i)it returns all files within the directory and subdirectories. How can I modify it to return the files with their full paths?