473,811 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Send file to recycle bin

I want to send some files to the recycle bin after I'm done using them.
I'd rather not delete them or make my own aging scheme.

How do I go about this? I haven't been able to find a C# example out there.

Thanks.

--
to reply, remove .s.p.a.m. from email
Nov 16 '05 #1
1 1824
Ben Bloom wrote:
I want to send some files to the recycle bin after I'm done using them.
I'd rather not delete them or make my own aging scheme.

How do I go about this? I haven't been able to find a C# example out
there.

Thanks.

I think I found my example. Haven't tested it yet, though:

http://216.26.160.137/Forums/AspNetF...px?PostID=5379

--
to reply, remove .s.p.a.m. from email
Nov 16 '05 #2

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

Similar topics

1
6445
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 http://www.dot.net.nz/codesamples.browseforfolder.aspx , and other places, the folder Ids are: /// /// Enum of CSIDLs identifying standard shell folders.
8
9750
by: JezB | last post by:
In c# code how do I delete a file while ensuring it goes into the recycle bin for possible recovery ?
2
1903
by: Bhavtosh | last post by:
hi im trying to write an app in C# which catches file delete event and keeps a copy of deleted file to a location before windows sends the file to the Recycle Bin. Im not able to do this wehn i delete an outlook message. any help on this issue wud of help. -- thanx.. Bhavtosh
2
1616
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 same machine (knowing how memory hungry it can be!) this presumably often inhibits recycling?? In the past I've had .NET 1.1 & SQL Server 2000 running on a 256Mb machine (!!) with a very fat session state (in-proc storage), and no recycle...
5
2559
by: jake | last post by:
I've seen many articles that claim the files in the App_Code directory are treated in the same way as aspx-files in ASP 1.1. Well, this does not seem to be the case, at least in Web Developer 2005 Express Beta2. If I change anything in any of the class files residing in App_Code, the AppDomain is unloaded and all application data, including all sessions, is lost. Is there anything I can do to prevent this? This undesired side-effect...
2
1424
by: | last post by:
Hello, I've read a lot of great threads by Ken Tucker and Herfried Wagner on using the SHFILEOPSTRUCT to send a file to the recycle bin. Is there a way to do this with a directory/folder as well? Thanks, Eric
12
8023
by: Lucas Tam | last post by:
I have a very simple loop: If (Directory.Exists(tempDirectory)) Then Try Dim Files() As String = Directory.GetFiles(tempDirectory) 'Clear out directory For Each Filename As String In Files File.Delete(Filename) Next Catch ex As Exception
0
1237
by: eyal | last post by:
Hi I've tested a code by Ken Tucker to send a file to recycle bin (SHFileOperation shell function). The only modification was to include: Private Const FOF_NOCONFIRMATION = &H10 And add it to the fFlags attr. of SHFILEOPSTRUCT This works well on my local machine (win2k .NET 1.1). I have also tried to run the similar code over a webservice (webmethod with string
1
1414
by: saurava | last post by:
I want to make a web page in which I will display some images and also I want to make a recycle bin or trash can inside that web page and when I wanted I should be able to drag that pictures into the recycle bin or trash can.And also I should be able to use the context menu or right click option in the webpage.
0
9728
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9205
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6890
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.