Empty recycling bin from command line

As I posted elsewhere, I use rmdir /q /s C:\Recycler to empty the Recycle Bin. If you have multiple drives, then replace C: with that drive letter.


Instructions are here

First, you need to create file called something like EmptyBin.reg like so:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Recycle Bin]
"StateFlags0001"=dword:00000002

Now, you create a batch (*.bat) file with the following:

regedit /s EmptyBin.reg
cleanmgr /sagerun:1

Run that batch file from the command line to empty your bin.