Last Updated March 25, 2003 |
Install | Source | Download | Changes | License | Contact

BinManager is shell context menu command for deleting old items from Windows recycle bin, as well as a scriptable component for managing the recycle bin. You can use either feature, or both.

This command enables you to empty all but the most recent items from your recycle bin. This is useful for several reasons:

The last two of these points were made by Developmentor's Ian Griffiths on Chris Sells' wonderful Windows Technical Off Topic mailing list.

BinManager requires version 4.71+ of Windows shell.dll. If you're running a fairly recent version of Windows and/or Internet Explorer, you'll be fine.

The following JScript for Windows Scripting Host demonstrates the component's usage.

var bin = new ActiveXObject("BinManager.RecycleBin");

// Report the contents of the recycle bin.
function Report(){
   WScript.Echo("Recycle Bin Holds\n" + bin.NumItems 
      + " items\n" + bin.Size + " bytes\n");


// Permanently delete items recycled more than two days ago.
// Note, the argument is full calendar days, so specifying
// zero would delete all items older than today.

// Permanently delete all recycled items.

Note on Windows 2k Pro and XP Pro, you can use the Group Policy Editor to specify scripts to be run on logoff or shutdown. On XP Pro:

  1. Click Start, click Run, type gpedit.msc, and click OK.
  2. Specify the script under:
    • Computer Configuration | Windows Settings for startup or shutdown, or
    • User Configuration | Windows Settings for logon or logoff.


  1. Download and run setup.exe.
  2. Right-click the recycle bin to ensure the "Delete Items Older Than" command appears on the menu.

Source is a Microsoft Visual C++ .NET project with attributed ATL. There are no dependencies on the CLR or WTL.


setup.exe (61k) (27k)


March 21, 2003. Version 1.0. March 24, 2003. Version 1.1. March 25, 2003. Version 1.2.


Copyright 2003 by Tim Tabor. All rights reserved. No warrantees extended. Use at your own risk. You may use the source code without royalty. You may not distribute any portion of the source or binary without the express written consent of Tim Tabor.


Please report bugs and feature requests to me.


Tim Tabor