How to scan through a directory recursively in Python?
Answers
Answered by
0
Here is your answer ⤵⤵⤵
To get a full path (which begins with top) to a file or directory in dirpath, do os.path.join(dirpath, name). One of the answers may be to use os.walk() to recursively traverse directories. The key here is to use os.path.join() when we read the files. Note that the names in the lists contain no path components.
HOPE IT HELPS YOU !!
Similar questions