Efficiently scans a folder to extract filenames, extensions, and full directory paths, supporting recursive traversal.