|
-
Mar 27th, 2001, 11:10 AM
#1
Thread Starter
Hyperactive Member
If you send files to the recycle bin (say 57,458 graphic files) through code, you run the risk of exceeding the maximum recycle bin size (usually 10% or drive space) and having the oldest files permanently deleted.
How can I read the current setting for the Maximum Recycle Bin size for a given partition ??
Then... How can I increase that number if I wanted to ???
Thanks !!!
-
Mar 27th, 2001, 09:35 PM
#2
Fanatic Member
you get get the size and number of items currently in the recycle bin with this code
Hope it helps
Code:
' 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
I will look for what you want in the registry
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
-
Mar 28th, 2001, 02:59 AM
#3
Thread Starter
Hyperactive Member
The SHQueryRecycleBin API Won't Return The Maximum Size.
Thanks for the response, however I have played with this sample code, and it can only tell you how much space is consumed by recycled items. I need to know how much more room there is in that magic garbage can.
Any ideas ???
Thanks.
-
Mar 28th, 2001, 07:55 AM
#4
There are 3 API calls which deal with the recycle bin :
- SHEmptyRecycleBin
- SHQueryRecycleBin
- SHUpdateRecycleBinIcon
But I have never come accross this before, I don't think it's possible and as above, is probably a registry setting.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|