Usually people get list of files inside the Recycle Bin using Shell32.dll
.
private static IEnumerable<string> GetRecycleBinFilenames()
{
const int ssfBitbucket = 10;
Type t = Type.GetTypeFromProgID("Shell.Application");
dynamic shell = Activator.CreateInstance(t);
Folder recycleBin = shell.NameSpace(ssfBitbucket);
foreach (FolderItem2 recfile in recycleBin.Items())
{
yield return recfile.Path;
}
Marshal.FinalReleaseComObject(shell);
}
I am mounting a VHDX file and want to get a list of files from the Recycle Bin on a mounted external disk/volume. How can I do this?