import os
file_path = "数据路径"
path_list = os.listdir(file_path)
path_name = []
for i in path_list:
path_name.append(i.split(".")[0])
for file_name in path_name:
with open("dataset.txt", "a") as file:
file.write(file_name + "\n")
print(file_name)
file.close()
08-18
316
08-05
2494