Delete items on recycle bin
Hi,
Anyone know how to delete items from recycle bin?
please help.
Best regards.
Naruse
Junior Poster in Training
53 posts since Jan 2008
Reputation Points: 34
Solved Threads: 0
you can use API file to do this.
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
how i can do this with api file?
i don't know about that..
can you help me sir?
Please help.
Best regards.
Naruse
Junior Poster in Training
53 posts since Jan 2008
Reputation Points: 34
Solved Threads: 0
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
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
Naruse
Junior Poster in Training
53 posts since Jan 2008
Reputation Points: 34
Solved Threads: 0