Solved

Directory watcher+ReadDirectoryChangeW

Posted on 2006-07-17
6
612 Views
Last Modified: 2013-11-20
Hi Experts

I am writing a directory watcher.
If a fie is added, deleted or modified in a folder say("C:\Test")
then it should be notified by adding comments to a ListBox control
is it possible using ReadDirectoryChangeW() or using any other method.

Thank You
Shiju S N
0
Comment
Question by:Shiju Sasidharan
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 250 total points
ID: 17127882
Check out the Win32 API FindFirstChangeNotification().

Following article at codeproject describes how to create a file system spy application which will help you :
http://www.codeproject.com/file/FileSpyArticle.asp

-MAHESH
0
 
LVL 48

Assisted Solution

by:AlexFM
AlexFM earned 250 total points
ID: 17127908
0
 
LVL 22

Expert Comment

by:mahesh1402
ID: 17127950
Along with FindFirstChangeNotification() and ReadDirectoryChangeW() there are undocumented functions SHChangeNotifyRegister and SHChangeNotifyDeregister that you can use in your application to know what is going on in your folder(s).
Refer : http://pcquest.ciol.com/content/coding/102070301.asp

To use FindFirstChangeNotification() you refer MSDN sample 'Obtaining Directory Change Notifications'
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/obtaining_directory_change_notifications.asp

-MAHESH
0
 
LVL 14

Author Comment

by:Shiju Sasidharan
ID: 17361839
sorry for  the delay
Thank u all for the help

Shiju S N
0

Featured Post

What Security Threats Are You Missing?

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.

Join & Write a Comment

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 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

13 Experts available now in Live!

Get 1:1 Help Now