paths= []
file = r'D:\Codeware\Pythoncode\nodejs\data'
for root, dirs, files in os.walk(file):
for file in files:
path = os.path.join(root, file)
if(path.split('.')[-1]!='gz'):
paths.append(path)
#得到输出文件路径数据
# print(paths)
# 挨个输出
for path in paths:
print(path)