Skip to content

Instantly share code, notes, and snippets.

@saccadic
Created June 17, 2020 00:58
Show Gist options
  • Save saccadic/932c29d4b7635eea0e2a85106b92e4e8 to your computer and use it in GitHub Desktop.
Save saccadic/932c29d4b7635eea0e2a85106b92e4e8 to your computer and use it in GitHub Desktop.
特定のフォルダ以下に含まれる特定のファイルを検索してファイルごとに何かの処理を行う
from tqdm import tqdm
import pandas as pd
import pathlib
targetDirectry = "./test"
requestFile = "**/**/**/*.bmp"
file = pathlib.Path(targetDirectry)
pathList = list(file.glob(requestFile))
for i in (range(len(pathList))):
print(i," : ",pathList[i])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment