#!/usr/bin/python
#coding:utf-8
import os
path_imgs = '文件夹path'
for files in os.listdir(path_imgs):
print(files)
img_name = files
# 想要加的字
img_path = "想要加的字" + img_name
with open("想要放txt文件的path/val.txt", "a") as f:
f.write(str(img_path) + '\n')
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交