Thread

  • Thread starter Thread starter N.Naeem
  • Start date Start date
N

N.Naeem

(VB.NET newbie)
I need some help in writing a small application which continuosly searches for a file in a list of folders eg
C:\FS\101
\102
\103
...
...

When a file is found then the application should begin processing the file. And another version of the program should begin i.e. which continues searching.
So a scenario could occur that 3 files are found then 3 processes which deal with the file should run simultaneously and another to continue searching. etc
I think is is todo with MultiThreading but i am not sure where to start in vb.net.
Many Thanks
 
When a file is found then the application should begin processing the file.
And another version of the program should begin i.e. which continues
searching.
So a scenario could occur that 3 files are found then 3 processes which deal
with the file should run simultaneously and another to continue searching.
etc
I think is is todo with MultiThreading but i am not sure where to start in
vb.net.

You could do it with threading, but then you'd be eating CPU from all the
active searching.

I think what will be a lot easier is to have your application create a
System.IO.FileSystemWatcher for each folder you want to monitor. Then you
just configure the properties and write an event handler.
 
Back
Top