المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : File copy progress



C# Programming
12-23-2009, 12:20 PM
Hello;

I am working on a little piece of code that copies files from one ******** to another. I want to display a progress of the operation in the console. I don't want to use P/Invoke win32.

I use File.Copy() method but it seems it is only possible to get the size before and/or after not during the copy.

For the time being, I use two seprate thread, one for copy and another one that display "=" while the copy thread is alive. This shows a progress but it is not very accurate !

I tried with StopWatch, FileSystemWatcher... Any help on this would be greatly apreciated !

http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif