I am using the file.copy command in a thread.

In general what I am trying to do is get a spool file from the printer spool folder and copying it to another folder using the filesystem watcher whcih then calls a copy subroutine.

This will work for the first and second file but then after about two files and error comes up saying:-


An unhandled exception of type 'System.IO.IOException' occured in mscorlib.dll
The supplied user buffer is not valid for the requested operation.

Cannot understand why this is happening, the files are all the same and have the same extention, of the form ######.spl the only difference is the name and cannot find information on this error.

I appreciate any help.