||
def file_name(file_dir):
for root, dirs, files in os.walk(file_dir):
#print(root) #当前目录路径
#print(dirs) #当前路径下所有子目录
print(files) #当前路径下所有非目录子文件
return(files)
files = file_name(路径)
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-9-27 21:30
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社