Hello everybody i want to get recycle bin all files and folders in a list box
using visual basic 6.0
please help me to solve this problem
See if this helps :
Private Sub EnumFolders(fld As Object) Dim oShell As Object, fldItem As Object Dim i As Long On Error Resume Next Set oShell = CreateObject("Shell.Application") For Each fldItem In fld.Items If fldItem.IsFolder Then Call EnumFolders(fldItem) End If list1.AddItem fld.GetDetailsOf(fldItem, 0) Next Set fldItem = Nothing Set fld = Nothing Set oShell = Nothing End Sub Private Sub Command1_Click() Dim oShell As Object Dim oRecycler As Object Set oShell = CreateObject("Shell.Application") Set oRecycler = oShell.NameSpace(10) EnumFolders oRecycler End Sub
We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.