Solved

Capturing file-deletion event?

Posted on 2001-07-25
6
149 Views
Last Modified: 2012-05-04


is it possible to write applicaion that runs in background and waits to see if someone is going to delete a file from windows explorer or other windows application? Does anyone know how to do this and can provide me with some sample source?

thanks in advance.
0
Comment
Question by:zastava101
6 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6320845
I suppose you could try using ReadDirectoryChangesW... as for sample source, you could check out the Folder Monitor that comes with RxLib.
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 6320894
0
 
LVL 20

Accepted Solution

by:
Madshi earned 90 total points
ID: 6320945
In NT based systems (NT4, 2000, XP) you can use ReadDirectoryChangesW, unfortunately there's nothing comparable in win9x based systems. You can use FindFirstFileNotification, but you'll only be notified that *something* changed in the directory you're watching. If that is good enough for you: Fine.

There are some undocumented functions, which work also in win9x. However, those functions are not really reliable. They work most of the time, but not always. I've implemented this kind of stuff in my madShell package (free for non-commercial usage). Look here for more infos:

http://help.madshi.net/Data/ShellEvents.htm

Regards, Madshi.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 14

Expert Comment

by:DragonSlayer
ID: 6332642
You can also check this out (it's not free, though):

http://www.alfasp.com/
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6872456
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20001252.html
http://www.experts-exchange.com/questions/Q.20026086.html
http://www.experts-exchange.com/questions/Q.20066091.html
http://www.experts-exchange.com/questions/Q.20070791.html
http://www.experts-exchange.com/questions/Q.20070795.html
http://www.experts-exchange.com/questions/Q.20081086.html
http://www.experts-exchange.com/questions/Q.20081708.html
http://www.experts-exchange.com/questions/Q.20082186.html
http://www.experts-exchange.com/questions/Q.20087813.html
http://www.experts-exchange.com/questions/Q.20094507.html
http://www.experts-exchange.com/questions/Q.20103740.html
http://www.experts-exchange.com/questions/Q.20104227.html
http://www.experts-exchange.com/questions/Q.20108539.html
http://www.experts-exchange.com/questions/Q.20112131.html
http://www.experts-exchange.com/questions/Q.20118798.html
http://www.experts-exchange.com/questions/Q.20141336.html
http://www.experts-exchange.com/questions/Q.20157666.html
http://www.experts-exchange.com/questions/Q.20159442.html
http://www.experts-exchange.com/questions/Q.20177987.html
http://www.experts-exchange.com/questions/Q.20182504.html
http://www.experts-exchange.com/questions/Q.20193634.html
http://www.experts-exchange.com/questions/Q.20194167.html
http://www.experts-exchange.com/questions/Q.20090036.html
http://www.experts-exchange.com/questions/Q.20265702.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20002824.html
http://www.experts-exchange.com/questions/Q.20179302.html
http://www.experts-exchange.com/questions/Q.20182632.html

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7071412
Request ignored, finalized.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now