May-09-2018, 04:40 AM
(May-09-2018, 01:12 AM)malonn Wrote: it returns all files within the directory and subdirectories. How can I modify it to return the files with their full paths?It's easier to use os.walk(),which is recursive bye default.
Then just join root and files for full paths.
import os for root,dirs,files in os.walk('D:\\App Back-Ups'): for file in files: print(os.path.join(root, file))