Click here to Skip to main content
15,880,972 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I want to copy an entire directory, and I need to send the directory source and destination path to the method or class I am going to use.
Can someone please help me?

What I have tried:

I tried ths:
https://www.codeproject.com/Answers/300184/Show-Progress-Bar-with-Copy-Folders-process#answer2
but can't find where to send the source and destination paths to the class in solution 2.
Posted
Updated 16-Apr-17 5:02am
Comments
Richard MacCutchan 16-Apr-17 11:04am    
You should post your question in the forum at the end of the article.

1 solution

In order to update a progress bar, you need to do the copy in a different thread - or the copy operation prevents the UI being updated.
The easiest way to handle that is to use a BackgroundWorker - it allows you to do the "meat" of the job in one thread, and provides events to show the progress: BackgroundWorker Class (System.ComponentModel)[^]
 
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