[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

farshad

3/21/2007 5:06:00 PM

Hi,
There is a folder on the network (FolderMain) that gets populated with .xml
files.
It is not known at what time of the day the folder gets populated with
files. But it does happen every now and then. i.e. every few days or once a
day, etc...
What is the best way in .net 2.0 or sql server 2005 to monitor if there are
any files in that folder on the network. I am thinking of using
FileSystemWatcher in .net 2.0
So that as soon as a file is added to the folder it can be processed.
Thanks
2 Answers

Mubashir Khan

3/21/2007 5:13:00 PM

0

yes this is a good way ... but i have never tried this with network folder.
"farshad" <farshad@discussions.microsoft.com> wrote in message
news:20BF57BB-B8F4-42E1-8754-5169C393AEC9@microsoft.com...
> Hi,
> There is a folder on the network (FolderMain) that gets populated with
> .xml
> files.
> It is not known at what time of the day the folder gets populated with
> files. But it does happen every now and then. i.e. every few days or once
> a
> day, etc...
> What is the best way in .net 2.0 or sql server 2005 to monitor if there
> are
> any files in that folder on the network. I am thinking of using
> FileSystemWatcher in .net 2.0
> So that as soon as a file is added to the folder it can be processed.
> Thanks


AlterEgo

3/21/2007 5:58:00 PM

0

farshad,

For your application, this sounds fine. However in high volume environments
(hundreds of files per minute), the FileSystemWatcher might miss some files.
If your requirement needs to be scalable, then use a timer and read the
directory directly.

-- Bill

"farshad" <farshad@discussions.microsoft.com> wrote in message
news:20BF57BB-B8F4-42E1-8754-5169C393AEC9@microsoft.com...
> Hi,
> There is a folder on the network (FolderMain) that gets populated with
> .xml
> files.
> It is not known at what time of the day the folder gets populated with
> files. But it does happen every now and then. i.e. every few days or once
> a
> day, etc...
> What is the best way in .net 2.0 or sql server 2005 to monitor if there
> are
> any files in that folder on the network. I am thinking of using
> FileSystemWatcher in .net 2.0
> So that as soon as a file is added to the folder it can be processed.
> Thanks