Check "Delete temporary files that my apps aren't using".
every day, week, month, or on low disk space.
Set a desired period for the feature, e.g.
Select "Change how we free up space automatically" on the Storage page.
Use the shortcut Windows-I to open the Settings application.
Microsoft's Windows 10 operating system comes with a new feature called Storage Sense you may configure it to delete Recycle Bin content, and other temporary files, regularly and automatically. Windows will execute the script (to delete Recycle Bin content) when Windows shuts down automatically from that moment on.
Use the Browse option to pick the emptyrecyclebin.bat that you created previously.
Double-click on Shutdown to open its Properties.
Go to Computer Configuration > Windows Settings > Scripts > Shutdown.
Type gpedit.msc and select the result to load the Group Policy Editor.
If you run professional or Enterprise editions, do the following: The next step depends on the Windows edition.
Test the file once to make sure it works.
Paste the following line of code into the document: PowerShell.exe -NoProfile -Command Clear-RecycleBin -Confirm:$false.
Right-click on the desktop or another folder and select New > Text Document.
It requires the creation of a batch file and running that batch file either using a policy or as a startup command. The following method is compatible with all Windows versions and editions.