Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Detect exactly which file/folder changed when monitoring folder

Posted on 2002-07-02
6
Medium Priority
?
272 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 800 total points
ID: 7126655
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 28

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
Suggested Courses

704 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