Re: Displaying Recycle bin true contents in ListView

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi Larry..

I had never thought of loading the shell interface and looking thru it in
the object browser. Over the course of the next week I will try and see if I
can find any other information on the other properties to make it act like
the recycle bin.

I had thought about loading an explorer window but was trying to keep
everything contain within the application. I had used the file system object
to get the drives and folders but found it to slow. I load them now thru a
dirbox and filelistbox and it much improves the speed.

I really appreciate all the help you have given me. It got me on the right
path. and showed me things I would not have figured out....

Rick

"Larry Serflaten" wrote:


"rellison" <rellison@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote
I have been doing some research this morning and have found out how to
access other various folders also. The one thing I can not find what is the
name all of the properties
.name
.size
.ect
that is associated with each of the list.items
Do these change with each folder type or are they the same and if so what
are they. I would like to see what info is available for each type...

As you may have read by now, Windows Scripting Host (WSH) can be
used to access the properties of physical folders and files, but it does
provide support for the virtual folders (Recycle, Network, Control Panel, etc.)
To get at those you use the Windows Shell.

You can find the Windows Shell interface in your VB References list and use
the VB Object Browser to examine all of its methods and properties.
(Add a reference to: Microsoft Shell Controls and Automation)

In addition to those listed, folders and files have extended properties such as
Owner, Author, Title, Subject, et al. To get at those you need to call the
folder's GetDetailsOf function passing in the desired file name, and the index
of the extended property you want returned. For more info see:
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_lunl.mspx?mfr=true

Like you, I had a tough time finding the property names. I got as far as I did
using only VB's Object Browser, but it did not list the two interfaces I had
found. So, I posted what I had to let you take it from there. There are several
extended properties and you might examine them all to see if any have the
Recycler info you need to mimic the Recycle Bin display.

But can I suggest a different approach? For the physical folders you can
use WSH to provide your listing, but for the virtual folders, how about
lauching a new explorer instance and letting it display the contents? If you
want the user to select one or more files, you could support (OLE) Drag
and Drop. I guess it really depends on what your application's main
function is....

None the less, this might be a useful link as well:
(Enumerating Special Folders)
http://www.microsoft.com/technet/scriptcenter/guide/sas_fil_higv.mspx?mfr=true

Example usage:

Option Explicit

Private Enum VF
[= Virtual Folders]
ControlPanel = 3
PrintersAndFaxes = 4
Documents = 5
Recent = 8
RecycleBin = 10
NetPlaces = 18
Cookies = 33
End Enum

Private Sub Command1_Click()
OpenVFolder VF.RecycleBin
End Sub


Private Sub OpenVFolder(ID As VF)
Dim sa
Set sa = CreateObject("Shell.Application")
sa.Open ID
End Sub


LFS





.



Relevant Pages

  • 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)
  • Re: Ron Sommer My Reply Need more info on the System Restore
    ... until I found folders that were not there when my first migration was ... System Restore won't delete the data, ... search for .DBX files. ... They will not be found in Recycle Bin.) ...
    (microsoft.public.windowsxp.general)
  • Re: Where do deleted progs go?
    ... I have been able to restore deleted programmes before, ... Re the Recycler folders: ... of the recycle bins or not. ...
    (microsoft.public.windowsxp.general)