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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top