Windows – Scheduling The Recycle Bin To Empty Itself

recycle-bintask schedulerwindows 7

Quite often I forget or neglect the Recycle Bin and the amount of debris that is disposed within it. Whilst I don't feel it to be critical, I would like to know what options exist that maybe associated with Task Scheduler for the Recycle Bin to empty itself automatically eg once a week.

Best Answer

The answer that Cyanfish posted in comments is excellent. You could use that without any third party tools:

You can effectively "empty" the Recycle Bin from the command line by permanently deleting the Recycle Bin directory on the drive that contains the system files. (In most cases, this will be the C: drive, but you shouldn't hardcode that value because it won't always be true. Instead, use the %systemdrive% environment variable.)

The reason that this tactic works is because each drive has a hidden, protected folder with the name $Recycle.bin, which is where the Recycle Bin actually stores the deleted files and folders. When this directory is deleted, Windows automatically creates a new directory.

So, to remove the directory, use the rd command (r​emove d​irectory) with the /s parameter, which indicates that all of the files and directories within the specified directory should be removed as well:

rd /s %systemdrive%\$Recycle.bin

Do note that this action will permanently delete all files and folders currently in the Recycle Bin from all user accounts. Additionally, you will (obviously) have to run the command from an elevated command prompt in order to have sufficient privileges to perform this action.


An alternative would be using a third-party tool like CCleaner that supports being run from the command prompt and scheduling that with Task Scheduler instead.

CCleaner can be set up to empty the recycle Bin and nothing else, and can then be run on schedule by using the command C:/Path/To/CCleaner.exe /AUTO