p / Client /Scripts /clear_images.py
q6's picture
Client menu
1b420ad
raw
history blame contribute delete
352 Bytes
import os
import shutil
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
IMAGES_DIR = os.path.join(ROOT_DIR, "images")
STASH_NAME = "Stash"
if os.path.isdir(IMAGES_DIR):
for folder in os.listdir(IMAGES_DIR):
if folder != STASH_NAME:
shutil.rmtree(os.path.join(IMAGES_DIR, folder), ignore_errors=True)