check file transfer complete

  • Thread starter Thread starter Grey
  • Start date Start date
G

Grey

i have used asp.net to transfer a file from one server to another . i use
the system.io.file.copy to copy the file. But i want to know that how can
assure the file is transfer complete?? Do i need to check the file is exist
in the target location??? any another smarter way to do that??

million thanks.
 
If the file transfer did not complete then an exception will be thrown on
the reason why. Wrap your code in a Try Catch Finally block and handle your
exception incase you encounter one
 
When File.Copy returns, the file is at its destination.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
Back
Top