Guys I have been creating a program that copies and moves files from folder to folder;
I am using this sort of code;

fileToCopy.CopyTo("path here...")


FileToMove.MoveTo("path here...")

My problem is, when I am copying or moving a large file, It's taking so much time and my program is hanging until all the files are completely moved or copied. How about, using a progressbar instead, so that the user will be able to see the progress of copying and moving instead of the program freezing? If this is doable, can anyone share knowledge about it? Thanks in advance...

6 Years
Discussion Span
Last Post by GeekByChoiCe

execute your copy/move method in a separate thread.
Set the max value of the progressbar to the original file filesize and update the progressbar to the copied file current size, using a timer.

Votes + Comments
"...update the progressbar..." = :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.