Script/Batch to empty recycling bin

  • Thread starter Thread starter DJ
  • Start date Start date
D

DJ

All,

Security here is pretty tight. We need a way to empty the
recycling bin at the users logoff. Is there a script/batch
file that will do this. Or is there another way that
someone know to do this.

TIA.

D.J.
 
I know you would run group policy editor. Go to Computer Configuration--Windows Settings--Scripts (Startup/Shutdown). You would then need to implement a new script to empty the recycle bin using Windows Scripting Host.
I hope this has helped.
 
A simple batch file in the logoff script with "rmdir /S /q Recycler" for XP or "rmdir /S /q Recycled" for 98 will do the trick. It removes the recycle bin directory which will be recreated when someone deletes something.
 
Back
Top