My program should look into a folder and perform actions on every file that arrives in that folder only. The file is then moved to a different folder so that file is not processed again.
The files appear in that folder after being FTP-ed from a mainframe elsewhere. Thus once the files initially appear, the may still be recieving data for 10 - 20 minutes.
In VB6 an infinite loop was used to loop through any files that were in the folder and testing if they could be accessed (or read from) before processing them.
Now I would rather use the fileWatcher in VB.NET. The problem is that I do not know what attributes to assign to the watcher so that the wathcher only sees the files once they are completely downloaded (and not just when the first appear in the directory).
Question:
Does anyone know of any attributes that can be used or how I should go about doing this? I would also appreciate any links that help explain this (The msdn library was a liitle vague about this circumstance).
Thank you for any help
The files appear in that folder after being FTP-ed from a mainframe elsewhere. Thus once the files initially appear, the may still be recieving data for 10 - 20 minutes.
In VB6 an infinite loop was used to loop through any files that were in the folder and testing if they could be accessed (or read from) before processing them.
Now I would rather use the fileWatcher in VB.NET. The problem is that I do not know what attributes to assign to the watcher so that the wathcher only sees the files once they are completely downloaded (and not just when the first appear in the directory).
Question:
Does anyone know of any attributes that can be used or how I should go about doing this? I would also appreciate any links that help explain this (The msdn library was a liitle vague about this circumstance).
Thank you for any help