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

Hi
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

FraasAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mike TomlinsonMiddle School Assistant TeacherCommented:
What version VB.Net?
0
FraasAuthor Commented:
I use .net 2.0
0
Fahad MukhtarDistinguished EngineerCommented:
See the My.Computer.FileSystem.CopyFile Method ,,,specifically the showUI Parameter which shows the current progress for u
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

FraasAuthor Commented:
ohh ... this will show the system Dialog .. I need to create my onw Dialog + Progress

thanks all
0
Fahad MukhtarDistinguished EngineerCommented:
You have to do it yourself then...
see the link
http://www.thescripts.com/forum/thread516498.html
start looking from the 4th comment
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
FraasAuthor Commented:
hi

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



0
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
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

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.