python遍历文件

来源:互联网 发布:p2p下载软件推荐 编辑:程序博客网 时间:2024/05/01 12:05
import osfor root, dirs, files in os.walk('要遍历的文件夹'):    for file in files:        print(root + os.sep + file)
输出文件路径及文件名
0 0
原创粉丝点击