I've been working on a custom identifier to display information on the recycle bin, I've only tested it on XP so I can't confirm if it works on 9x, NT, ME, 2K, 2003, or Vista. Basically without changing the code too much unless it doesn't work on the above Operating Systems is there anything else I can do with it?
//echo -a $recycle(0) - Displays the number of files in the recycle bin.
//echo -a $recycle(0).size - Adds together the sizes of each file in the recycle bin.
//echo -a $recycle(1) - Displays the path and file of the first item in the recycle bin.
//echo -a $recycle(1).size - Displays the size of the first item in the recycle bin.
Properties: nopath, size, ctime, mtime, atime, shortfn, longfn, and attr.
alias recycle {
if ($isid) {
var %x = $findfile(C:\Recycler,*.*,0),%y = $findfile(C:\Recycler,*.*,$1), %z = C:\Recycler
if (!$prop) {
if ($1 == 0) return %x
if ($1 != 0) && ($1 <= %x) return %y
}
elseif ($prop == nopath) {
if ($1 <= %x) return $iif($nopath(%y) !isnum,$nopath(%y))
}
elseif ($prop == size) {
if ($1 == 0) {
noop $findfile(%z,*.*,0,var %size = $calc(%size + $file($1-)))
return %size
}
if ($1 != 0) && ($1 <= %x) return $file(%y)
}
elseif ($prop == atime) { return $file(%y).atime }
elseif ($prop == ctime) { return $file(%y).ctime }
elseif ($prop == mtime) { return $file(%y).mtime }
elseif ($prop == attr) { return $file(%y).attr }
elseif ($prop == shortfn) { return $file(%y).shortfn }
elseif ($prop == longfn) { return $file(%y).longfn }
}
}
Thanks in advance!
SladeKraven