Solved

C# 2008 - Call a method when a new file is copied into a folder

Posted on 2014-02-24
2
258 Views
Last Modified: 2014-02-27
Hello Experts,

I have a C# Program written in C# 2008.

Every so often a user updates a folder with a new file of the same name. I am trying to figure out a way for my program to automatically call a method when the file is updated in the folder mentioned above.

Does anyone know how to do this?

Thanks!
0
Comment
Question by:Saxitalis
2 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 39884450
The FileSystemWatcher is a .Net component specially built for that. Have a look at http://emoreau.com/Entries/Articles/2005/04/The-FileSystemWatcher-component.aspx
0
 

Author Closing Comment

by:Saxitalis
ID: 39893394
Thanks - this is perfect - checking it out now...
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 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