By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,183 Members | 1,190 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,183 IT Pros & Developers. It's quick & easy.

Service and folder polling

P: n/a
I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a
folder.

Thanks,

Tom
Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"tshad" <tf*@dslextreme.com> wrote in message
news:eS*************@tk2msftngp13.phx.gbl...
I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a
folder.

Thanks,

Tom


System.IO.FileSystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail to
send an email notification when an event is raised.

CVD
Nov 17 '05 #2

P: n/a
"Cletus Van Damme" <cl****@iforgot.com> wrote in message
news:u2**************@TK2MSFTNGP12.phx.gbl...
"tshad" <tf*@dslextreme.com> wrote in message
news:eS*************@tk2msftngp13.phx.gbl...
I am trying to write a service that will send out emails whenever a file
hits a folder.

I know that email services do it. Is there a way to do this without
constantly reading the folder to see when a file is put into it?

I just want to be notified by an event that something has been put into a folder.

Thanks,

Tom
System.IO.FileSystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail to
send an email notification when an event is raised.

I just found a program on the web that does uses the Folder Watcher and it
was exactly what I was looking for and works great.

Can I still use System.Web.Mail from a normal Application or Windows
Service?

I was a little curious about that.

Thanks,

Tom
CVD

Nov 17 '05 #3

P: n/a
"tshad" <tf*@dslextreme.com> wrote in message
news:eC**************@TK2MSFTNGP09.phx.gbl...
"Cletus Van Damme" <cl****@iforgot.com> wrote in message
news:u2**************@TK2MSFTNGP12.phx.gbl...
"tshad" <tf*@dslextreme.com> wrote in message
news:eS*************@tk2msftngp13.phx.gbl...
>I am trying to write a service that will send out emails whenever a file
> hits a folder.
>
> I know that email services do it. Is there a way to do this without
> constantly reading the folder to see when a file is put into it?
>
> I just want to be notified by an event that something has been put into a > folder.
>
> Thanks,
>
> Tom
>
>


System.IO.FileSystemWatcher can be used to recieve events when a file is
created in a folder. You could then use the classes in System.Web.Mail
to
send an email notification when an event is raised.

I just found a program on the web that does uses the Folder Watcher and it
was exactly what I was looking for and works great.

Can I still use System.Web.Mail from a normal Application or Windows
Service?

I was a little curious about that.

Thanks,

Tom
CVD


Yes, you sure can, just add a reference to System.Web.dll.

CVD
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.