rahul
rahul

Reputation: 3

Invoke the c# application if any update on shared file

Hi I am trying to create a c# window forms application (using Framework 3.5), what application will have is some shared data on .txt file where my application should be invoked (or receive some message) if there is any update to the .txt file. My requirement is in Windows Forms, any suggestions would be helpful.

Upvotes: 0

Views: 85

Answers (3)

Brian
Brian

Reputation: 4984

I'd suggest using Named Pipes

Interprocess Communication using Named Pipes in C#

Upvotes: 1

Filip
Filip

Reputation: 51

If I understand you correctly, what you want is just a process running with a file updated event handler that runs your winform app.

The FileSystemWatcher class is what you need for the file update events. http://www.dotnetforce.com/Content.aspx?t=a&n=200

Upvotes: 1

BrokenGlass
BrokenGlass

Reputation: 160862

You can use the FileSystemWatcher class for this.

Upvotes: 2

Related Questions