Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
create windows services that automatically execute if the specified folder having content

i need to check a folder using windows services in every time intervals ,if the folder having file .it automatically executes an exe.

Please anyone help me to do this

Thank you in advance
Posted
Updated 29-May-16 15:41pm
v2
Comments
Kornfeld Eliyahu Peter 22-May-16 9:04am    
Look for FileSystemWatcher
F-ES Sitecore 22-May-16 9:15am    
Google "c# windows schedule service" or just "c# how to write a service". You can use threads to sleep\wake at intervals to check the folder or you can use FileSystemWatch to be notified when the folder\files change, then use Process.Start to run an EXE. All you have to do is put these things together, and to answer your next question no I won't write it for you, this isn't a code-on-demand website.
Kornfeld Eliyahu Peter 22-May-16 14:21pm    
"no I won't write it for you" - I would say you already did it :-)
+5

1 solution

You havnt really supplied a great list of requirements - based on what you have stated, I would

- write a service starting with TopShelf,
- Add Quartz.Net
- Use a Directory Watcher job from Quartz.Net

Useful Links

Topshelf[^]

J: New in Quartz.Net 2.0–Directory Scan Job[^]
 
Share this answer
 

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