How to empty recycling bin from command line in Windows XP?

link|improve this question

43% accept rate
feedback

3 Answers

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\Volum eCaches\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.

link|improve this answer
Unfortunately it doesn't work for me. It clears some system caches, but it leaves recycling bin untouched :/ – Davvid Feb 7 '10 at 9:25
feedback

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.

link|improve this answer
feedback

The recycle bin is just another folder; you should be able to delete the files from C:\RECYCLER to achieve the same effect as emptying the recycle bin from the GUI.

link|improve this answer
1  
The recycle bin is not a simple folder at all, but rather a virtual one. It's true that its contents are stored in the "Recycler" or "$Recycle.bin" directories on each drive root, but I wouldn't blindly delete their contents. It's probably OK, but it would feel like a dirty hack. :o) – efotinis Feb 6 '10 at 13:57
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.