145:ディレクトリ内のファイルを再帰的に処理 os モジュールの walk 関数を用いると、あるディレクトリ内のファイルを再帰的に探索することができます。 次のようにすると、ディレクトリ spam 内のファイルのパスが得られます。 import os for root, dirs, files in os.walk(u'root_dir'): for file_ in files: full_path = os.path.join(root, file_) print full_path print full_path の部分を希望する処理内容に置き換えてください。 使用例 カレントディレクトリに含まれるファイルのファイル名先頭に文字列 python_recipe_ をつけます。 import os for root, dirs, files in os.walk(u'.'): for

