A simple Python script that lets you select directories and automatically clear out all the files and folders inside them.
The script remembers your selected directories by saving them in a JSON file so you don’t have to re-enter them every time you run it.
I often find myself running out of storage on my computer and noticed that temp files, cache files, and downloads would pile up over time and take up a lot of unnecessary space. Coming from a creative background, we deal with a lot of temp files and autosaves generated from programs that can quickly become overwhelming. Decided to make this tool to help others dealing with similar issues. Hopefully you'll find this useful!
- Save a list of directories in a
directory_list.jsonfile - Add new directories when running the script
- Clears all files and folders inside each saved directory
- Ignores invalid directories
- Python
- No extra libraries needed (uses only built-in modules)
- Clone or download this repo:
git clone https://github.com/bdang2461/Directory-Deleter.git
cd Directory-Deleter
- Run the script:
python directory_deleter.py
-
Enter the full path of any directory you want cleared.
-
Add as needed.
-
Press Enter on a blank line when you’re ready.
All done! Selected directories should be deleted.
The script will save your selections so you don’t have to add them again next time.