Re: Displaying Recycle bin true contents in ListView
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Sat, 20 Oct 2007 23:17:46 -0500
"rellison" <rellison@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
I have written an app that includes a mini-explorer window. I have a treeview
to display drives and Folders and a Listview to display folders and files. I
have been un able to find out how to list the true contents of the recycle
bin as it is shown in explorer. Can someone shed some light on this for me.
Either explaining how or some source that will show how to do it. I am also
trying to figure out My Network places so they would both probabaly be the
same since they are virtual folders.
Here is some code to get you started. I am not sure how the Recycle bin
is storing its information, and I had difficulty in finding information on the
needed interfaces (Folder2, FolderItems2). But it can get you going where
you might research the details yourself....
LFS
' Option Explicit
Private Sub Command1_Click()
Const RECYCLER = &HA&
Const NETWORK = &H31&
List1.Font.Name = "Courier"
On Error Resume Next
Set winShell = CreateObject("Shell.Application")
Set Folder = winShell.Namespace(RECYCLER)
Debug.Print "Folder", TypeName(Folder)
Set List = Folder.Items
Debug.Print "List", TypeName(List)
For X = 0 To List.Count - 1
List1.AddItem Left$(List.Item(X).Name & Space$(40), 38) & " " & List.Item(X).Size & vbTab & List.Item(X).ModifyDate
Next
Command1.Caption = List1.ListCount & " items"
End Sub
.
- Prev by Date: Re: Calculate Last Digits
- Next by Date: Re: VB6 LISTBOX problem
- Previous by thread: OTsort of but not really, Nvidia issue that affects all apps.
- Next by thread: Re: Displaying Recycle bin true contents in ListView
- Index(es):
Relevant Pages
|