file_list = []
for root, dirs, files in os.walk('Test'):
    file_list.extend(join(root, f) for f in files)
print(sorted(file_list, key=getsize))
How to get list of all sub directories and files along with their size ordered by size?