Re: How can I tell when my file is done copying?



if File.Copy doesn't throw, then you can fairly safely assume it was copied.

"Terry Olsen" <tolsen64@xxxxxxxxxxx> wrote in message
news:ufRVwrfkFHA.3144@xxxxxxxxxxxxxxxxxxxxxxx
> Using the following code to copy a file from a local pc to a remote
> server across a 128K line:
>
> File.Copy(src, dst, True)
>
> If File.LastWriteDate(src) = File.LastWriteDate(dst) Then
> Msgbox("Upload Verified.")
> Else
> Msgbox("Upload Failed.")
> End If
>
> It always comes back failed. But if I wait a few moments and check it
> again, it'll come back Verified.
>
> I guess the File.Copy is exiting before the copy is complete? So how
> would I be able to verify the copy has fully completed before checking
> the LastWriteDate?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages


Quantcast