📜  python 从 os.walk 中获取文件路径 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:44.245000             🧑  作者: Mango

代码示例1
shpfiles = []
for dirpath, subdirs, files in os.walk(path):
    for x in files:
        if x.endswith(".shp"):
            shpfiles.append(os.path.join(dirpath, x))