Re: Displaying Recycle bin true contents in ListView




"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




.



Relevant Pages

  • Re: Explorer cant find folders or drives
    ... Thanks for the response, tried it without success. ... Microsoft MVP: Windows Server ... searches but cannot find or display drives or folders. ...
    (microsoft.public.windows.file_system)
  • Re: Explorer cant find folders or drives
    ... Microsoft MVP: Windows Server ... searches but cannot find or display drives or folders. ...
    (microsoft.public.windows.file_system)
  • Re: Compact messages
    ... cerning the fix that started that recycle bin "redundancy". ... Do not archive mail in default OE folders. ... follow up by compacting your folders manually ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: Files deleted but free space doesnt increase
    ... it sounds like he went into the RECYCLER folder from the command prompt ... the testing doesn't send files to the Windows recycle bin. ... The files are deleted but the free space does ... but now that I have compression running on some folders ...
    (microsoft.public.windows.file_system)
  • Re: Having problems adjusting to XP
    ... That said, if your concern is disk space, I can perhaps set your mind ... real estate in your folders list, but it's not taking up significant ... Recycle Bin _does_ take real space, but presumably you know how to ...
    (microsoft.public.windowsxp.basics)