Skip to content

Instantly share code, notes, and snippets.

@kskomori
Created January 16, 2015 10:39
Show Gist options
  • Save kskomori/feb6a92514054b8f366e to your computer and use it in GitHub Desktop.
Save kskomori/feb6a92514054b8f366e to your computer and use it in GitHub Desktop.
# path 以下のファイル/ディレクトリ一覧を再帰的に探索
import os, os.path
root_path = '/dir/'
for root, dirs, files in os.walk(root_path):
for file in files:
#print(os.path.join(root, file))
if len(file.encode('utf-8')) > 40:
print(" {}".format(file))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment