LoginSignup
0
1

More than 3 years have passed since last update.

pythonのglobで再帰的にファイルを取得

Posted at

備忘録。
python3.6で、特定のディレクトリ配下の全てのjpg画像を再帰的に読み込んで、名前順でソートする方法。

import glob
file_list = sorted(glob.glob('directory_name/**/*.jpg', recursive=True))
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1