import os for i in range(1000, 1059): total_files = 0 for root, dirs, files in os.walk(f"/mnt/petrelfs/zhuchenglin/LLaVA/playground/data/LLaVA-Pretrain/images/0{i}"): total_files += len(files) print(total_files)