you get get the size and number of items currently in the recycle bin with this code
Hope it helps
I will look for what you want in the registryCode:' This code is licensed according To the terms And conditions listed here. ' Display the number of items In the Recycle Bin On the C: ' drive And the size of it. Dim rbinfo As SHQUERYRBINFO ' information about the bin Dim retval As Long ' return value ' Initialize the size of the structure. rbinfo.cbSize = Len(rbinfo) ' Query the contents of C:'s Recycle Bin. retval = SHQueryRecycleBin("C:\", rbinfo) ' the path doesn't have To be the root path ' Display the number of items In the Recycle Bin, If the value is ' within Visual Basic's numeric display limits. If (rbinfo.i64NumItems.LowPart And &H80000000) = &H80000000 Or rbinfo.i64NumItems.HighPart > 0 Then Debug.Print "Recycle Bin contains more than 2,147,483,647 items." Else Debug.Print "Recycle Bin contains"; rbinfo.i64NumItems.LowPart; "items." End If ' Likewise display the number of bytes the Recycle Bin is taking up. If (rbinfo.i64Size.LowPart And &H80000000) = &H80000000 Or rbinfo.i64Size.HighPart > 0 Then Debug.Print "Recycle Bin consumes more than 2,147,483,647 bytes." Else Debug.Print "Recycle Bin consumes"; rbinfo.i64Size.LowPart; "bytes." End If




Reply With Quote