how can I copy file in C# or VB.NET and catch the progress of the operation ??

In C# or VB.NET I can use this command to copy files

System.IO.File.Copy("SourceFile", "DestFile");

But this command only useful if I have small files

But if I have large file 600MB it’s so important to catch the progress of the operation

My question is : how can I copy file in C# and catch the progress of the operation ??

Thanks with my best regarding

Who is Participating?
Fahad MukhtarConnect With a Mentor Distinguished EngineerCommented:
You have to do it yourself then...
see the link
start looking from the 4th comment
Mike TomlinsonMiddle School Assistant TeacherCommented:
What version VB.Net?
FraasAuthor Commented:
I use .net 2.0
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

Fahad MukhtarDistinguished EngineerCommented:
See the My.Computer.FileSystem.CopyFile Method ,,,specifically the showUI Parameter which shows the current progress for u
FraasAuthor Commented:
ohh ... this will show the system Dialog .. I need to create my onw Dialog + Progress

thanks all
FraasAuthor Commented:

I know about this concept from the first time but I say to myself maybe there’s a direct way by using the new .net 2.0 functions

But because you give me the same concept .. no way I will start use it :) like before

Fahad MukhtarDistinguished EngineerCommented:
My.Computer.FileSystem.CopyFile is new in .net2.0 .. but unfortunately there is no readymade method for the thing that you want.. as far as i know
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.