파이썬 폴더 안 파일개수 확인

화이팅·2023년 4월 18일
0

파일개수 확인

import os

path='./Data/img'

for root, sub, files in os.walk(path):
    if len(files)>0:
        print(root, len(files))

출처 : https://webnautes.tistory.com/1687

profile
하하...하.

0개의 댓글