Skip to content

Instantly share code, notes, and snippets.

@Neko288
Created December 12, 2021 04:06
Show Gist options
  • Save Neko288/e5628664a8b9256fef8030cb4d6e403f to your computer and use it in GitHub Desktop.
Save Neko288/e5628664a8b9256fef8030cb4d6e403f to your computer and use it in GitHub Desktop.
フォルダー内の画像数を調べます。
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