Hey all.. well I have been all over the VB forums and file download sites.. There is NO code anywhere that shows the restore, empty, and restore all functions in VB.I need to know how to do these in the Recycling Bin.. Any ideas?
Printable View
Hey all.. well I have been all over the VB forums and file download sites.. There is NO code anywhere that shows the restore, empty, and restore all functions in VB.I need to know how to do these in the Recycling Bin.. Any ideas?
I've seen it. try looking in the API section at this site. It is here some where.
-William
Take a look at http://www.mvps.org/vbnet/code/system/shrecycle.htm.
I think that this is all that you need.
Try this.
Code:Private Declare Function SHEmptyRecycleBin Lib "shell32.dll" Alias "SHEmptyRecycleBinA" (ByVal hwnd As Long, ByVal pszRootPath As String, ByVal dwFlags As Long) As Long
Private Sub Command1_Click()
'Empty the Recycle Bin
SHEmptyRecycleBin Me.hwnd, "", 0&
End Sub
Thanks fellas.. I'll see if this helps... Thanks again..:)
Knight
Megatron, how would you restore files from a recycle bin?
right.. after going through and looking at what was presented, I too have noticed that I can only empty the recycling bin.. I need to be able to restore all and/or restore just one file as well as be able to delete just one file at a time if need be.. I also noticed that it renames the file/folders to something like DC01.tx or jpg or whatever the extension is.. but it renames the main name to it... How do I recall what the REAL name to the file used to be...
Knight Vision