473,413 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

C# - Recycle Bin

Can someone point me in the right direction on how to send files to the
Recyle Bin using C#.
Nov 17 '05 #1
5 6463
The way I've done this in the past is to p/invoke SHFileOperation.
http://www.pinvoke.net/default.aspx/...HFileOperation
http://msdn.microsoft.com/library/de...eoperation.asp

--
Tim Wilson
..Net Compact Framework MVP

"Gene Vital" <no********@msnew.com> wrote in message
news:e5**************@TK2MSFTNGP15.phx.gbl...
Can someone point me in the right direction on how to send files to the
Recyle Bin using C#.

Nov 17 '05 #2
Tim Wilson wrote:
The way I've done this in the past is to p/invoke SHFileOperation.
http://www.pinvoke.net/default.aspx/...HFileOperation
http://msdn.microsoft.com/library/de...eoperation.asp

Thanks for the links, that is the direction I was going.
I thought it would be built into the frameworks and just wanted to check
and makes sure I didn't miss something.
Nov 17 '05 #3
AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
something that has been included in 2.0 (currently beta) or not.

--
Tim Wilson
..Net Compact Framework MVP

"Gene Vital" <no********@msnew.com> wrote in message
news:uk*************@TK2MSFTNGP14.phx.gbl...
Tim Wilson wrote:
The way I've done this in the past is to p/invoke SHFileOperation.
http://www.pinvoke.net/default.aspx/...HFileOperation
http://msdn.microsoft.com/library/de...eoperation.asp

Thanks for the links, that is the direction I was going.
I thought it would be built into the frameworks and just wanted to check
and makes sure I didn't miss something.

Nov 17 '05 #4
Tim Wilson wrote:
AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
something that has been included in 2.0 (currently beta) or not.

ok, that works nicely. pointer to how to undelete from the recycle bin ?
Nov 17 '05 #5
I haven't had a need to go "the other way" and restore a file from the
recycle bin. So I can't give you a direct pointer but, after doing some
poking around, it seems that a few people recommend reading the article
linked below for information on dealing with the recycle bin. I'm not sure
if it will give you all the information you need but it should give you a
start.
http://www.codeproject.com/shell/recyclebin.asp

If that turns out to be a bust, then try looking through some other posts on
the subject to see if any have some more insight.
http://groups-beta.google.com/groups...le+recycle+bin

--
Tim Wilson
..Net Compact Framework MVP

"Gene Vital" <no********@msnew.com> wrote in message
news:Od**************@tk2msftngp13.phx.gbl...
Tim Wilson wrote:
AFAIK, it's not in the framework up to 1.1. I'm not sure if this is
something that has been included in 2.0 (currently beta) or not.

ok, that works nicely. pointer to how to undelete from the recycle bin ?

Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Chuck Anderson | last post by:
I know this is more of a Windows question, but I've Googled this and can not find an answer. Is there a PHP interface to the Windows recycle bin? I want to put files there instead of deleting...
1
by: Kerem Gümrükcü | last post by:
Hi, how can i get the pyhsical path to a recycle bin object. i am working with the FileSystemWatcher Object and i dont want to handle events inside the recycle bin, because the FSW Object...
1
by: Thomas Halwax | last post by:
Hi, I wrote some code using the shell32.dll to query the size of the recycle bin. The function does not produce an error but the results are not correct: public struct SHQUERYRBINFO {...
1
by: Frank Meng | last post by:
Hi. I wrote a program to get the directory of "Recycle Bin" with SHGetSpecialFolderLocation . It works for "Recent", "SendTo", etc. but it doesn't work for "Recycle Bin". At...
2
by: John | last post by:
Is the only criteria for worker process recycle 60% physical memory usage?? (I'm on W2K, default setup - I know you can change it in machine.config). Because if so, when using SQL Server on the...
1
by: MattC | last post by:
Hi, I've got two questions. Application has 200 users only. 1.) If an application can be accessed at any period between 8am and 12midnight, what would a reasonable app recycle time be? ...
5
by: johnb41 | last post by:
I searched and found a way (via API) t0 add a deleted file to the recycle bin. (Thanks Ken Tucker! :)) But I was wondering if VB.NET 2005 (framework 2.0) has a non-api solution. (Note: i...
10
by: =?Utf-8?B?U3RlZmFuIEJhcmxvdw==?= | last post by:
This has been working perfectly for months. Since we switched from ASP.NET 1.1 to 2.0, we have constant and sporadic issues with updating our applications. Touching the web.config works about...
2
by: =?Utf-8?B?VVNBT3o=?= | last post by:
I am using Windows Vista Ultimate (x86). I accidently deleted my Desktop Recycle Bin. I restored it (Control Panel/Personalise/Change Desktop Icons). I clicked on the Recycle Bin (Full) icon...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.