This is a multi-part message in MIME format.

------=_NextPart_000_0154_01C4C285.EFD2E030
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

(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.=20
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

------=_NextPart_000_0154_01C4C285.EFD2E030
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>(VB.NET newbie)</FONT></DIV>
<DIV><FONT size=3D2>I need some help in writing a small application =
which=20
continuosly searches for a file in a list of folders eg</FONT></DIV>
<DIV><FONT size=3D2>C:\FS\101</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
\102</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
\103</FONT></DIV>
<DIV><FONT size=3D2>..</FONT></DIV>
<DIV><FONT size=3D2>..</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>When a file is found then the application should =
begin=20
processing the file.&nbsp;And another version of the program should =
begin i.e.=20
which continues searching.&nbsp;</FONT></DIV>
<DIV><FONT size=3D2>So a scenario could occur that 3 files are found =
then 3=20
processes which deal with the file should run simultaneously and another =
to=20
continue searching. etc</FONT></DIV>
<DIV><FONT size=3D2>I think is is todo with MultiThreading but i am not =
sure where=20
to start in vb.net.</FONT></DIV>
<DIV><FONT size=3D2>Many Thanks</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0154_01C4C285.EFD2E030--

Re: Thread by Mike

Mike
Thu Nov 04 11:45:49 CST 2004

>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.

--
Peace & happy computing,

Mike Labosh, MCSD
"I have no choice but to believe in free will."