Solved

Detect exactly which file/folder changed when monitoring folder

Posted on 2002-07-02
6
262 Views
Last Modified: 2008-02-01
Hi:

I'm using VB6 and I'm using the FindFirstChangeNotification along with the other ChangeNotification API's and the WaitForSingleObject API to detect when a specified folder's contents have changed.  For example, the program will alert me if someone adds a file, deletes a file, modifies a file in that folder, etc.  I can detect that something changed but I have been unable to figure out exactly what changed.  For example, if someone deletes a file, then I can only detect that the folder in which the file resided has in some way changed.  I'd like to be able to log exactly what was deleted, added, etc.

Looking forward to your responses.

Thank you.
0
Comment
Question by:ksm
6 Comments
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7126516
Can you move to VB.Net and use the FileSystemWatcher?
0
 

Author Comment

by:ksm
ID: 7126561
Interesting.  I have it installed onto my machine but haven't had the chance to start using vb.net yet.  Perhaps now's my reason.
0
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 7126655
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 27

Expert Comment

by:Ark
ID: 7139588
Hi
You have to use subclassing technique instead of WaitForSingleObject and convert pointers(pidls) from callback function into display names. See this sample for more info:
http://www.mvps.org/vbnet/code/shell/shchangenotify.htm

Cheers
0
 
LVL 69

Expert Comment

by:Éric Moreau
ID: 7348066
This question appears to be abandoned. A question regarding it will be left in the CleanUp
area; if you have any comment about the question, please leave it here.

Unless there is objection or further activity, one of the moderators will be asked to accept the comment
of <emoreau>.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7373293
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

757 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