how to detect changes to a folder in asp.net -


i have folder lets call componentsfolder, has components inside it. if 1 inserts new component, when start application should recognize new component has been added , should extract path , file size , add database (sql server 2005). how can accomplish ?

i'm using c# in vs2008.

take @ file watcher class can detect changes file or directory:

http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx

use windows service monitor folder non-stop:

http://msdn.microsoft.com/en-us/library/aa984074%28v=vs.71%29.aspx


Comments