HighTechTalks DotNet Forums  

Recycle Bin with C#

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Recycle Bin with C# in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Andres
 
Posts: n/a

Default Recycle Bin with C# - 11-20-2003 , 03:52 PM






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.

Reply With Quote
  #2  
Old   
AT
 
Posts: n/a

Default Re: Recycle Bin with C# - 11-22-2003 , 03:15 PM






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.

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.