473,657 Members | 2,427 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Canceling file or directory deletion in .NET

Hi there,

Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?

Thanks,

Tony
Jul 19 '05 #1
7 1609

"Tony" <an****@hotmail .com> wrote in message
news:4c******** *************** **@posting.goog le.com...
Hi there,

Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?

Thanks,


Hi Tony,

please ignore the response by Tommy McDaniel...it was as rude as they get.
(Also, please ignore the rants of "perseus", who apparently has the day off
from junior high and nothing better to do.) But to get a good answer to
your question, you'll need to post it to a microsoft-specific newsgroup.
Check the news.microsoft. com news server for available .NET groups...there
are plenty. (By the way, if you are not in control of the deletions in the
first place, my guess is that you won't be able to intercept them until they
happen....but as I said it's just my guess.)

-Howard

Jul 19 '05 #2
Tony wrote:
Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?


Your question has nothing to do with C++, but with a
specific library and OS.
You have better chances in getting an answer in

microsoft.publi c.dotnet.langua ges.vc

or maybe in one of the

microsoft.publi c.vc.*

groups.

I have never heard about this FileSystemEvent Handler
function, so I cant really tell which of this ng's suits
your needs best.

greets,

Christoph

Jul 19 '05 #3
On 12 Aug 2003 13:53:42 -0700
td**@hotmail.co m (Tommy McDaniel) wrote:
an****@hotmail. com (Tony) wrote in message
news:<4c******* *************** ***@posting.goo gle.com>...
Hi there,

Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows
you to catch file operations after they have occurred but I need to
be able to catch it before it occurs. Does anyone know a way of
doing this?

Thanks,

Tony


Now just what in the crap does that have to do with Standard C++?


No no, that is NOT the way to say it!

Tony, you post is OT, you should ask in a .NET newsgroup, this is a
group for standard C++ and .NET is not standard C++.

br
socketd
Jul 19 '05 #4
"Howard" <al*****@hotmai l.com> wrote in message news:<bh******* *@dispatch.conc entric.net>...
"Tony" <an****@hotmail .com> wrote in message
news:4c******** *************** **@posting.goog le.com...
Hi there,

Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?

Thanks,


Hi Tony,

please ignore the response by Tommy McDaniel...it was as rude as they get.
(Also, please ignore the rants of "perseus", who apparently has the day off
from junior high and nothing better to do.) But to get a good answer to
your question, you'll need to post it to a microsoft-specific newsgroup.
Check the news.microsoft. com news server for available .NET groups...there
are plenty. (By the way, if you are not in control of the deletions in the
first place, my guess is that you won't be able to intercept them until they
happen....but as I said it's just my guess.)

-Howard


No claim was made that it was not rude. Nevertheless, telling someone
to ignore everyone else so that you can say basically the same thing
but in a much more long-winded manner is just brilliant. I'm all for
being polite, but there's a point (like, oh, say, when half the
fricking page for the newsgroup as displayed by Google Groups is taken
up by people talking about all kinds of crap that bear no importance
whatsoever to the topic of the stinking newsgroup) where one starts to
lose patience over .Net questions in a Standard C++ newsgroup.

Tommy McDaniel
Jul 19 '05 #5

"Tommy McDaniel" <td**@hotmail.c om> wrote in message
news:c0******** *************** ***@posting.goo gle.com...
"Howard" <al*****@hotmai l.com> wrote in message

news:<bh******* *@dispatch.conc entric.net>...
"Tony" <an****@hotmail .com> wrote in message
news:4c******** *************** **@posting.goog le.com...
Hi there,

Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?

Thanks,


Hi Tony,

please ignore the response by Tommy McDaniel...it was as rude as they get. (Also, please ignore the rants of "perseus", who apparently has the day off from junior high and nothing better to do.) But to get a good answer to
your question, you'll need to post it to a microsoft-specific newsgroup.
Check the news.microsoft. com news server for available .NET groups...there are plenty. (By the way, if you are not in control of the deletions in the first place, my guess is that you won't be able to intercept them until they happen....but as I said it's just my guess.)

-Howard


No claim was made that it was not rude. Nevertheless, telling someone
to ignore everyone else so that you can say basically the same thing
but in a much more long-winded manner is just brilliant. I'm all for
being polite, but there's a point (like, oh, say, when half the
fricking page for the newsgroup as displayed by Google Groups is taken
up by people talking about all kinds of crap that bear no importance
whatsoever to the topic of the stinking newsgroup) where one starts to
lose patience over .Net questions in a Standard C++ newsgroup.

Tommy McDaniel


My, my...a little touchy, aren't we! Let me guess...you've been reading
that crap from perseus? :-) In case you haven't read your own response, it
does *not* say the same thing as mine. I suggested (in a couple sentences,
not in a any long-winded fashion) exactly where he might find the help he
desired. You replied with profanity, and no explanation at all. And your
response only makes sense if the OP knows (in advance) that his topic was,
well, off-topic. Despite what many say here, newbies in general have no
idea that there even *is* an FAQ page until they are told so. If I walked
into a hardware store and asked where the milk was, and you responded by
asking "what in the crap milk has to do with hardware", you'd be looking for
a fight, or at least a well-aimed finger. You *might* consider giving
newbies a break, once at least, and either being polite in your response or
ignoring their post altogether. There is absolutely NO reason to snap his
head off like that. (At least not until they start acting like our dear
friend perseus.)

-Howard


Jul 19 '05 #6
"Howard" <al*****@hotmai l.com> wrote in message news:<bh******* *@dispatch.conc entric.net>...
"Tommy McDaniel" <td**@hotmail.c om> wrote in message
news:c0******** *************** ***@posting.goo gle.com...
"Howard" <al*****@hotmai l.com> wrote in message news:<bh******* *@dispatch.conc entric.net>...
"Tony" <an****@hotmail .com> wrote in message
news:4c******** *************** **@posting.goog le.com...
> Hi there,
>
> Is there any event you can catch that would you allow to cancel the
> deletion of a file or directory. The FileSystemEvent Handler allows you
> to catch file operations after they have occurred but I need to be
> able to catch it before it occurs. Does anyone know a way of doing
> this?
>
> Thanks,
>

Hi Tony,

please ignore the response by Tommy McDaniel...it was as rude as they get. (Also, please ignore the rants of "perseus", who apparently has the day off from junior high and nothing better to do.) But to get a good answer to
your question, you'll need to post it to a microsoft-specific newsgroup.
Check the news.microsoft. com news server for available .NET groups...there are plenty. (By the way, if you are not in control of the deletions in the first place, my guess is that you won't be able to intercept them until they happen....but as I said it's just my guess.)

-Howard


No claim was made that it was not rude. Nevertheless, telling someone
to ignore everyone else so that you can say basically the same thing
but in a much more long-winded manner is just brilliant. I'm all for
being polite, but there's a point (like, oh, say, when half the
fricking page for the newsgroup as displayed by Google Groups is taken
up by people talking about all kinds of crap that bear no importance
whatsoever to the topic of the stinking newsgroup) where one starts to
lose patience over .Net questions in a Standard C++ newsgroup.

Tommy McDaniel


My, my...a little touchy, aren't we! Let me guess...you've been reading
that crap from perseus? :-)


Not really, although I've seen all the threads. Time is too scarce a
resource to waste your time on crap like that.
You replied with profanity, and no explanation at all.
Uh, unless "crap" is now profanity, you're just making stuff up. And I
did explain that comp.lang.c++ wasn't the group for your .Net needs,
whether you like how I expressed it or not.
And your response only makes sense if the OP knows (in advance) that his topic
was, well, off-topic.
The fact that this is comp.lang.c++ and not comp.lang..net should have
alerted him to the fact that he was off-topic.
Despite what many say here, newbies in general have no idea that there even
*is* an FAQ page until they are told so.
You don't need the FAQ to read the sign that says comp.lang.c++.
If I walked into a hardware store and asked where the milk was, and you
responded by asking "what in the crap milk has to do with hardware", you'd be
looking for a fight, or at least a well-aimed finger.
And yet, if half of everybody that came through my hardware store was
asking for milk, you'd not only probably get a response similar to the
one you just mentioned, but I might not care too much about the
consequences either.
You *might* consider giving newbies a break, once at least, and either being
polite in your response or ignoring their post altogether.
As I usually am, those times that I don't ignore them, which I almost
always do. I already explained to you the cause for my attitude in
this instance, although I must admit that I'm getting just about sick
of all the .Net questions here.
There is absolutely NO reason to snap his head off like that.
Sure there was, just not necessarily the best one in your opinion.
Until robots start visiting newsgroups, you're going to have to deal
with humans and their limited patience.
(At least not until they start acting like our dear friend perseus.)


Hmm, getting people's private information is easy these days, just cry
"copyright violation," no proof needed or anything. I'm all for
forming a comp.lang.c++ mob, going to his house, and beating him with
a stick in his own yard.

Tommy McDaniel
Jul 19 '05 #7
Christoph Rabel <od**@hal9000.v c-graz.ac.at> wrote in message news:<3f******* *************** *@aconews.univi e.ac.at>...
Tony wrote:
Is there any event you can catch that would you allow to cancel the
deletion of a file or directory. The FileSystemEvent Handler allows you
to catch file operations after they have occurred but I need to be
able to catch it before it occurs. Does anyone know a way of doing
this?


Your question has nothing to do with C++, but with a
specific library and OS.
You have better chances in getting an answer in

microsoft.publi c.dotnet.langua ges.vc

or maybe in one of the

microsoft.publi c.vc.*

groups.

I have never heard about this FileSystemEvent Handler
function, so I cant really tell which of this ng's suits
your needs best.

greets,

Christoph


thanks for the GENUINE reponses. i must admit that i posted the
original question quite quickly and did not realize there was a better
category for it.

thanks to those of you trying to point me in the right direction...and
to the others, you need to take a break.

tony
Jul 19 '05 #8

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

Similar topics

5
1113
by: matt dittman | last post by:
I have created a windows service that reads emails from a drop directory and moves them to the appropriate mail folder every 15 seconds. I can move, rename and delete the files as needed, up until the CDO.DropDirectory.GetMessages() method is called. At this point, the files are locked until I shut down the service. After processing and delivery, I need to be able to delete all the files in the drop directory. I can delete them via...
2
1836
by: Justin | last post by:
Hi all, Does anybody know a way, in VB.Net, I can discover the file locks on a file on the local machine. I have an application which needs to delete specific files, but I would like to verify in advance whether or not a particular deletion will succeed. Due to other pre-deletion actions, I cannot attempt the deletion and catch the exception if it fails. Thanks in advance
3
1626
by: jaws | last post by:
My problems is as follows. Hope you guys can provide some insight. 1. I have a class which opens a file and simply spits out the text. Methods in place to open, print, close, and delete the file. 2. This class is instantiated as a thread, I have several acting on different files. 3. The application is web based. The user can kill the app. from the browser, effectively leaving my temp files undeleted because the app can
7
1254
by: Diggler | last post by:
I have a web application that allows a user to manage files on the server. On the page is a counter that tells them how many files are in their folder. When you delete a file from the folder using ASP.NET, it seems to send a command off to delete the file and keeps processing the page... the page reloads, but the file count of the folder doesn't change because it seems that the page rendering is faster than the file deletion. Is there...
9
2231
by: Claudio Grondi | last post by:
I am aware, that it is maybe the wrong group to ask this question, but as I would like to know the history of past file operations from within a Python script I see a chance, that someone in this group was into it already and is so kind to share here his experience. I have put already much efforts into this subject googling around, but up to now in vain. Best option I encountered yet is usage of the Greyware 'System Change Log' service...
13
4174
by: DH | last post by:
Hi, I'm trying to strip the html and other useless junk from a html page.. Id like to create something like an automated text editor, where it takes the keywords from a txt file and removes them from the html page (replace the words in the html page with blank space) I'm new to python and could use a little push in the right direction, any ideas on how to implement this? Thanks!
11
5786
by: comp.lang.php | last post by:
Once again, I thought my class method deleteZip() would do the trick, but it never deletes any .zip* file found in a directory: /** * Delete any latent ZIP files found in this album. This method is to be inherited by all listing classes to allow for * list-wide deletion of latent server-created ZIP files for security purposes *
8
2276
by: aki | last post by:
Hi All, I describe the problem as below. A directory( path known) , contains 0 to any number of files . The file names are with following structure : OMCID_NETYPE_NENAME_NAMEOFTHEAPPLIEDFILE_APPLYDATE_trans.csv For example :
6
4207
by: Bill H | last post by:
I am wondering if this is possible. I have a file that is accessed by multiple users and keeps track of activity (the file is polled by flash every 2 seconds). As users leave, the flash program tells the php program to remove them from the activity file, and as users access this activity file, users who have timed out (haven't been heard from in 60 seconds) are removed. Using a combination of flock, microsecond sleeps, loops and the flash...
0
8402
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
8315
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8608
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
7341
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
5633
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();...
0
4164
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4323
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1962
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1627
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.