V
vul
I'm developing Windows Service which is going to listen MS Fax service
events and update the database when Fax Job changed its status.
I need to read OutboxLOG.txt which is used by MS Fax service.
I either would like to copy it and to work with its copy to use its data
for a database update or to copy the data from OutboxLOG.txt into another
file for further processing.
I'm using :
Do
Try
System.IO.File.Copy(strSource, strDestination, True)
Exit Do
Catch
End Try
Loop
In most cases it works, but sometimes (I have no idea what it depends on) it
doesn't. I suspect that the source file is in use and is not copied.
Could anybody suggest any other approach to copy file when it's in use, or
to copy its contents?
Thank you
Al
events and update the database when Fax Job changed its status.
I need to read OutboxLOG.txt which is used by MS Fax service.
I either would like to copy it and to work with its copy to use its data
for a database update or to copy the data from OutboxLOG.txt into another
file for further processing.
I'm using :
Do
Try
System.IO.File.Copy(strSource, strDestination, True)
Exit Do
Catch
End Try
Loop
In most cases it works, but sometimes (I have no idea what it depends on) it
doesn't. I suspect that the source file is in use and is not copied.
Could anybody suggest any other approach to copy file when it's in use, or
to copy its contents?
Thank you
Al