directory monitoring
Posted
by foz1284
on Stack Overflow
See other posts from Stack Overflow
or by foz1284
Published on 2010-05-08T08:37:24Z
Indexed on
2010/05/08
8:48 UTC
Read the original article
Hit count: 150
Hi, What is the best way for me to check for new files added to a directory, I dont think the filesystemwatcher would be suitable as this is not an always on service but a method that runs when my program starts up.
there are over 20,000 files in the folder structure I am monitoring, at present I am checking each file individually to see if the filepath is in my database table, however this is taking around ten minutes and I would like to speed it up is possible,
I can store the date the folder was last checked - is it easy to get all files with createddate > last checked date.
anyone got any Ideas?
Thanks
Mark
© Stack Overflow or respective owner