Delete Files Older Than X-Days - Cleanup Script is a Powershell script designed to delete old files and generate a log file as a scheduled task.
Delete Files Older Than X-Days offers various levels of logging and the script can also run in -listonly mode so it only lists the files it would otherwise delete.
There are two main routines, one to delete the files and a second routine that checks if there are any empty folders left that could be deleted.
There are also two logging levels available, failed only and verbose, which logs every file and folder that is deleted.
Delete Files Older Than X-Days - Cleanup Script is designed for administrators or advanced users. You can use many switches to get it working however you like. For example, if the following gives you a headache, you might stick with CCleaner: