import shutil, os, time
def delete_files(path):
"""
删除指定类型的文件
:param path: 文件路径
:return:
"""
for root, dirs, files in os.walk(path):
for name in files:
# if name.startswith("Screenshot"):
if name.endswith(".HEIC"):
os.remove(os.path.join(root, name))