Click here to Skip to main content
15,908,264 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
code for copy one folder data to another folder with progress bar and calculating time time also using c#.net
Posted
Comments
CHill60 8-Feb-13 4:09am    
This is just like your previous questions at http://www.codeproject.com/Questions/541367/codeplusforpluscreatingplusfolderpluswithplusprogr
and
http://www.codeproject.com/Questions/541109/codeplusforplusprogressplusbarplususingplusc-23-ne
Post what you have done so far and ask an actual question or describe the problem you're having. We are not here to just do your homework for you

Search article about SHFileOperation.
I think this function will do it for you.

Best regards.
 
Share this answer
 
Rather than just giving you the code, I'll give you some pseudo code. You should be able to convert the logic into actual code with ease.
If source directory doesn't exist take no action
If destination directory doesn't exist, create the directory

Create a background task for the file copy operation
For each file in the source directory
  If the file doesn't exist in the destination directory
    Copy the file into the destination directory
  End if
  Report the percentage of files copied back to the primary thread.
Next
For the task based work, I'd recommend using Task over BackgroundWorker.
 
Share this answer
 
v2

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