Anglelika had a question a few weeks back:
“Mr Steve. I need to clear the recycle bin when users log out. Is there any way I can put a command in their logout script to do this? PS. Don’t ask why…just something the boss wants : ()”
This is an interesting one. I thought a quick and simple VB Script solution would work.
It turns out you need to parse out the name of the Recycle bin. Doing it like this can break, since the Recycle bin might be renamed to something different – or it might be another language version of Windows.
Plus, from with some of my testing, I noticed that sometimes the VB Script would prompt the user – something we definitely don’t want from a command line script.
Instead, I created a very simple command line application that can do this for you. It is called EmptyRecycle.exe
It clocks just under 100K, so this guy is really small.
To use it, make sure your Recycle bin is loaded with junk:
Nahh..Just kidding about that. Your recycle bin can be empty.
Just call it from the command line:
And within a few moments, your recycle bin will be empty.
Get it from our download page:
As always, no spyware, or adware. Just freeware goodness.
It is free to use for Personal, and Commercial use.
One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools