Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def r(path):
- for dir_file in path.iterdir():
- if dir_file.is_file():
- file_list.append(os.path.abspath(dir_file))
- else:
- if dir_file.is_dir():
- sub_list.append(dir_file)
- sub_list.extend(r(dir_file))
- file_list.sort()
- return file_list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement