Forum Discussion
Abramova
13 years agoStaff
Hi,
To get the Recycle Bin path from script, you can try to call the SHGetSpecialFolderPath function from shell32.dll. For sample code of calling routines from the shell32 dynamic link library, please see http://smartbear.com/support/viewarticle.aspx?aid=9009.
To check whether the needed folders exist in Recycle Bin, you can also use the following code:
Const RECYCLE_BIN = &HA
Set oShell = Sys.OleObject("Shell.Application")
Set items = oShell.Namespace(RECYCLE_BIN).Items()
For Each Item In Items
If Item.IsFolder Then
Set objFolder = Item.GetFolder
Log.Message objFolder.Title
End If
Next
End Sub