The Settings app includes Storage Sense, a feature that automatically runs when the storage is low in space. Alongside the ability to delete temporary files, you can also enable the feature to delete files in the recycle bin or Downloads folder that haven’t changed in the last 30 days. However, it is limited and doesn’t offer an option to monitor additional folders to delete files that haven’t changed in the previous 60 days.
When you store temporary files from the internet or projects in different folders, it’s possible to use the ForFiles command in Command Prompt and Task Scheduler to delete files from any folder older than a specific number of days.
In this guide, you will learn the steps to manually delete files that haven’t been modified in a specific number of days and the instructions to create an automated task that will delete files older than a certain number of days inside any folder on Windows 10.