; Recycle bin sample script uses a COM object to work
; with the recycle bin.
; Requires BinManager.dll to be installed on the system,
; see http://www.cheztabor.com/binmanager/

Dim $bin, $items, $size

$bin = CreateObject("BinManager.RecycleBin")
$items = $bin.NumItems
$size = $bin.Size

? "RecycleBin contains " $items " items " $size " bytes"
; 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.
$Returnvalue = $bin.DeleteOldItems(2)
; This permanently deletes all recycled items.
$Returnvalue = $bin.Empty()