check file transfer complete

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.
 
T

Tampa.NET Koder

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
 
K

Kevin Spencer

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top