Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C# File monitoring

0 views
Skip to first unread message

Chris Fink

unread,
Oct 29, 2008, 8:55:02 AM10/29/08
to
I have a requirement to monitor a folder for new files. Just looking for a
suggestion on which approach you would take on design.

1. Using windows services to write a .NET service that automatically looks
for new files every x mins via a timer, etc.
2. Using task scheduled to write a .NET exe that is scheduled to run at a
set interval.

This app will monitor a directory for new files and when found insert them
into a DB then delete them from the directory. I think either approach will
accomplish the task, just looking for opinions and/or other suggestions to
approach this simple task.

Thanks

Mark Rae [MVP]

unread,
Oct 29, 2008, 9:05:24 AM10/29/08
to
"Chris Fink" <Chri...@discussions.microsoft.com> wrote in message
news:44F95E09-EF76-4064...@microsoft.com...

> I have a requirement to monitor a folder for new files.

OK.

> I think either approach will accomplish the task,

More than likely...

> just looking for opinions and/or other suggestions to approach this simple
> task.

Everything you need is already built into the .NET Framework:
http://www.google.co.uk/search?sourceid=navclient&hl=en-GB&ie=UTF-8&rlz=1T4GPTB_en-GBGB298GB298&q=%22C%23%22+FileSystemWatcher


--
Mark Rae
ASP.NET MVP
http://www.markrae.net

0 new messages