diff --git a/skratch.py b/skratch.py index 329fccb..a892bcd 100755 --- a/skratch.py +++ b/skratch.py @@ -14,11 +14,14 @@ def delete_all(d): if not os.path.exists(d): print("Nothing to delete") else: - for file in os.listdir(d): - f = os.path.join(d,file) - os.remove(f) - print(f"removing: {f}") - print("Done") + list_all(d) + x = input("Delete the above files? y/N ") + if x.lower() == 'y': + for file in os.listdir(d): + f = os.path.join(d,file) + os.remove(f) + print(f"removing: {f}") + print("Done") def list_all(d): if not os.path.exists(d):