[Asm] 纯文本查看 复制代码import os
import shutil
def delete_directories_with_images(directory):
for root, dirs, files in os.walk(directory):
for d in dirs:
subdir = os.path.join(root, d)
if any(f.endswith('.jpg') for f in os.listdir(subdir)):
print(f"Deleting directory: {subdir}")
shutil.rmtree(subdir)
directory_to_search = input('文件夹地址:')
delete_directories_with_images(directory_to_search)