Solved

Directory watcher+ReadDirectoryChangeW

Posted on 2006-07-17
6
617 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 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

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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: …

617 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