6 Years
Discussion Span
Last Post by smith.mitchell7

how i can do this with api file?
i don't know about that..
can you help me sir?

Please help.
Best regards.


See if this helps :

Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hwnd As Long, ByVal pszRootPath As String, ByVal dwFlags As Long) As Long
Dim RetVal As Long
Private Sub Command1_Click()
Dim y As Integer
   y = MsgBox("Are u sure to delete all items on Recycle Bin ? ", vbYesNo, "Confirmation")
   If y = vbYes Then
      RetVal = SHEmptyRecycleBin(0&, vbNullString, &H1)
   MsgBox "Recycle Bin has been cleaned"
   End If
End Sub
Votes + Comments
Its Worked :)

It will empty the other stuff in the recycle bin but leave the icon like there is something there although when you open it up there is nothing in there. So, when I use the Disk Cleanup system tool, the recycle bin icon is empty, but when I navigate to it with PowerDesk (enhanced Windows Explorer utility), it shows that there is a folder in the recycle bin called "Dc2" and a file in that called "

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.