?
Solved

Directory watcher+ReadDirectoryChangeW

Posted on 2006-07-17
6
Medium Priority
?
618 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
[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
  • 2
6 Comments
 
LVL 22

Accepted Solution

by:
mahesh1402 earned 1000 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 1000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 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