
Save space on your hard drive by setting up automatic deletion of Windows 10 Recycle Bin contents at regular intervals.
Deleting files by sending them to the Windows 10 Recycle Bin is not enough to free up space on your hard drive. If the recycle bin is not emptied, deleted items remain stored there and can be recovered if needed.
To permanently delete these files, and free up space on your machine’s storage, it is therefore imperative to think, from time to time, of emptying the recycle bin.
For those with more head in the air, it is possible to automate the emptying of the trash at regular intervals, without you having to take care of anything. Here’s how to use Windows Task Scheduler for this.
1. Open the task planner
In the Windows taskbar search box, type Task Scheduler and open the app with a double click.

2. Create a new task
Select the Library directory of the task scheduler in the left column, do a right click on the directory and choose to create a New folder that you will name as you wish, “Empty the recycle bin” for example.

Select this new folder, and right click to Create a task.

Then choose a name for it, the same as that used for the directory for example.

3. Choose a trigger
Then go to the Trigger tab and click New. Here you must choose the element that will trigger the desired action, namely, that of emptying the Windows recycle bin, as well as its settings.

To avoid emptying the recycle bin precipitously at the risk of losing a document deleted inadvertently, it is better to keep launching the task at the scheduled time.
In the settings, select Every week, set the time for the task to be performed and check the day for which you want the task to be performed. Validate the trigger by clicking on OK.

Then check your trigger settings. In our case, the recycle bin will be emptied automatically, every week, at 12 noon, every Monday.

4. Configure the action
Then go to the Actions tab and click New.

In the Program / script line, type cmd.exe, then in the Add arguments field, copy and paste the following command:
/ c “echo Y | PowerShell.exe -NoProfile -Command Clear-RecycleBin”

Validate the action by clicking OK twice in a row. You can then close Windows Task Scheduler and patiently wait for your task to run automatically on the day and time you set.