import os
searchFolder = '/Users/bubble/Desktop/pics'
for root, dirs, files in os.walk(searchFolder):
for file in files:
pathName = os.path.join(root,file)
print pathName
print os.path.getsize(pathName)
print
f = open('/Users/bubble/Desktop/workfile.txt','w')
f.write(pathName)
/Users/bubble/Desktop/pics/IMG_2999.JPG の 1 行のみがテキスト ファイルに出力されます。
出力全体をテキスト ファイルに出力したい (後で、見栄えを良くするために編集できる html ファイルも)
ありがとう