Sample
http://www.aspfree.com/articles/1352,1/articles.aspx
and you can always resort to an interop
enum RecycleFlags :uint
{
SHERB_NOCONFIRMATION = 0x00000001,
SHERB_NOPROGRESSUI = 0x00000002,
SHERB_NOSOUND = 0x00000004
}
[DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
static extern uint SHEmptyRecycleBin(IntPtr hwnd, string pszRootPath,
RecycleFlags dwFlags);
[STAThread]
static void Main(string[] args)
{
uint result = SHEmptyRecycleBin(IntPtr.Zero, null, 0);
}
Hope this helps,
Randy
http://www.kbcafe.com
"Andres" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
Does anyone know how to work with the Recycle Bin with C#?
I mean how to get the list of files that are in the
Recycle Bin, hoy to send a file there, how to recover the
files of the Recycle Bin, etc...
Thanks for any help. |