This script allows you to clean up a directory. The script expects the directory path as an argument.
WARNING : The script will clean all the contents of the directory without any verification, make sure that what you are going to clean is not important data.
The goal is to automate the script to clean the folders every x times, for example a registry folder that needs to be cleaned every day because it takes up a lot of space.
If you want to automate the script in Windows, you must create a .bat
file that runs the script. To automate it, you can use Task Scheduler, see here Schedule Python Script in Windows
If you want to automate the script in OSX or Linux, you must create a cron job, see here Schedule a Python Script using Cron Job
usage : cleaner.py [-h] [-p PATH]
options arguments :
-h, --help show this help message and exit
-p, --path folder path to clean
$ python cleaner.py -p D:\User\Documents\logs
We have a discord server in case you have any questions or want to be informed about the project news. Do not hesitate to join us, we are waiting for you.