Solved

Detect exactly which file/folder changed when monitoring folder

Posted on 2002-07-02
6
265 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 70

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 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 7126655
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
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 70

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

773 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