Windows and applications create many blank folders on your hard drive. And they stick even after you uninstall the software. To solve this issue of ghost folders, I created a simple python script to delete all empty folders in any given drive or folder path. Here is the code;
For this script to work, of course you need python to be installed on your computer.
Usage of the script is very simple:
- Open up a terminal/command prompt and navigate to the folder containing
E:\Directory\Name\ToBe\Clearedto any folder you want to clear.
- Depending on hard drive speed and levels of directories, this script may take some time to complete.
I hope you find it useful. Enjoy!