INNER CODE UNIT · Python
delFiles
Haeri/PhotonBox · scripts/cache_cleaner.py:8
def delFiles(dest, filters):
for item in os.listdir(dest):
if os.path.isdir(dest + item):
delFiles(dest + item + "/", filters)
elif item.lower().endswith(filters):
print("Delete " + dest + item)
os.remove(dest + item)
print("------------------------------- START -------------------------------")
delFiles(engine_res_path, (".pbt", ".pbm"))
delFiles(game_res_path, (".pbt", ".pbm"))
print("------------------------------- DONE -------------------------------")