app.py
1 2 3 4 5 6 7 8 |
import os folder_path = 'files' for filename in os.listdir(folder_path): if filename.endswith('.png'): os.remove(os.path.join(folder_path, filename)) print(f"Deleted: {filename}") |
app.py
1 2 3 4 5 6 7 8 |
import os folder_path = 'files' for filename in os.listdir(folder_path): if filename.endswith('.png'): os.remove(os.path.join(folder_path, filename)) print(f"Deleted: {filename}") |