1 #coding:utf-8 2 3 import os 4 5 6 for root,dirs,files in os.walk("D:"): 7 for fileItem in files: 8 print root + os.sep + fileItem
结果如下