import os
#小程序可以把指定目录(path)下的所有(.aac)文件的路径获取到
#适用于对指定目录中文档批量操作
path = 'E:/硬盘/安装文件/未尝试/PhoneRecord/'
names = []
#allfile = print(os.listdir(path))
for file in os.listdir(path):
#print(file)
file_path = os.path.join(path, file)
if os.path.splitext(file_path)[1] == '.aac':
names.append(file_path)
for name in names:
#你要进行的操作,比如:打印文件路径
print(name)