Click here to Skip to main content
15,888,212 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more: , +
i want to copy and past some file from server to client.
and i want to use backgroundworker
this is my code:
but doesnt work

What I have tried:

private void button1_Click(object sender, EventArgs e)
       {
           backgroundWorker1.RunWorkerAsync();
       }

private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
      {
           File.Copy(@"d:\f.mp4", @"d:\2\f.mp4");
      }
Posted
Updated 22-Feb-17 23:45pm
Comments
Richard Deeming 23-Feb-17 15:59pm    
"doesn't work" is not a proper description of the problem.

Remember, we can't see your screen, access your computer, or read your mind. If you don't give us a detailed description of the problem, we can't help you.

Click "Improve question" and update your question with a clear description of the problem. Include the full details of any errors, and remember to indicate which line of code they relate to.

1 solution

You could but really not like that.

Here is a google search that will give you lots of different solutions to do what you want: c# copy files asynchronously[^] - pick the one that you feel most comfortable with as you'll need you maintain the code.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900