Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

monitor folder  for new or modified files w/ c#

Posted on 2009-05-01
2
Medium Priority
?
862 Views
Last Modified: 2012-06-27
how is thte best way to have a program monitor a set of folders for new or modified files and then perform some action when that occurs?  is there a method that will be compatible on both xp and vista?
0
Comment
Question by:wrynn
2 Comments
 
LVL 31

Accepted Solution

by:
Frosty555 earned 1000 total points
ID: 24285104
The most effective thing to do is use a FileSystemWatcher object. You should be able to drop one onto your form from the toolbox. It's part of the System.IO assembly.

Microsoft Reference:
http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx

Example:
http://articles.techrepublic.com.com/5100-10878_11-6165137.html
0
 
LVL 26

Assisted Solution

by:Anurag Thakur
Anurag Thakur earned 1000 total points
ID: 24285194
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

810 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