I have a project which waits for new text files to arrive in a folder. The files are sent over via web services in stream and a php program on the same machine converts the stream to a text file. Once my FileSystemWatcher detects the newly arrived file it goes into action and that seems to be working very well. There are hundreds of new files arriving each week. But once in a while I see this come up in the textbox which I use to log the files when they arrive.:
An The process cannot access the file 'C:\xampp\htdocs\in\16-1362690199.txt' because it is being used by another process. error occurred while trying to access 16-1362690199.txt
It appears that the file is still in use by the php program when my program tries to open and read it. I'm thinking of using the stream directly into my VB.NET project but for the moment the programmer who wrote the php code is putting the kabash on this saying there has got to be something wrong with my FileSystemWatcher.
Any suggestions would be appreciated.
Quote:
An The process cannot access the file 'C:\xampp\htdocs\in\16-1362690199.txt' because it is being used by another process. error occurred while trying to access 16-1362690199.txt
Any suggestions would be appreciated.