Thread

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • N.Naeem

    #1

    Thread

    (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

  • Mike Labosh

    #2
    Re: Thread

    >When a file is found then the application should begin processing the file.[color=blue]
    >And another version of the program should begin i.e. which continues
    >searching.[/color]
    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.FileS ystemWatcher 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."


    Comment

    Working...