V
vul
I need to copy the file (OutboxLog.txt produced by Fax service) right after
it was updated. I'm using:
System.IO.File.Copy(strSource, strDestination, True) to do that, but if the
source file is busy (was not closed yet after update) the copy process
fails.
I tried to insert a loop:
For lngAttempt = 0 To 100000
Application.DoEvents()
Next
It works, but I don't like this approach. I would prefer something like:
Do While IsBusy = True
IsBusy = (some code which returns the status of the file)
Loop
Unfortunately I do not know what do I have to put on the right in this
expression.
Any idea please
Thank you
Al
it was updated. I'm using:
System.IO.File.Copy(strSource, strDestination, True) to do that, but if the
source file is busy (was not closed yet after update) the copy process
fails.
I tried to insert a loop:
For lngAttempt = 0 To 100000
Application.DoEvents()
Next
It works, but I don't like this approach. I would prefer something like:
Do While IsBusy = True
IsBusy = (some code which returns the status of the file)
Loop
Unfortunately I do not know what do I have to put on the right in this
expression.
Any idea please
Thank you
Al