Click here to Skip to main content
15,904,817 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Everyone, here's a question:

I want to create a windows service, that is always running and monitorizes a folder for new incoming files (.xml) and create a log, registering that information and run a piece of code everytime that a new file appears.

Hope you can help me, thanks
Posted

1 solution

Quite complete:

http://devproconnections.com/net-framework/how-build-folder-watcher-service-c?page=3[^]


To use vs

http://msdn.microsoft.com/en-us/library/zt39148a(v=vs.80).aspx[^]


As you are new to c# I would suggest you develop the whole concept as a console application. This will allow you to debug and test much easier. Once you are satisfied then create a service from the template and move your tested application classes to it.
 
Share this answer
 
v2
Comments
CDCC8 8-Aug-13 11:46am    
I am new to C # and. Net, and I never created a service before. Btw, I saw no code to write a log file, only the Windows event log.
[no name] 8-Aug-13 18:24pm    
I think you should start by implementing your service and add functionality from there. The purpose of this forum is to provide assistance- not to do the entire task for you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900