Created
December 12, 2021 04:06
-
-
Save Neko288/e5628664a8b9256fef8030cb4d6e403f to your computer and use it in GitHub Desktop.
フォルダー内の画像数を調べます。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from os.path import join | |
import pprint | |
import re | |
path = r'C:/XXXXXXXXXXXX' | |
files = [] | |
for ext in ('*.gif', '*.png', '*.jpg', '*.jepg','*.webp',): | |
files.extend(glob.glob(join(path, ext))) | |
print(len(files)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment