Solved

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

Posted on 2007-03-26
7
932 Views
Last Modified: 2011-09-20
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

0
Comment
Question by:Fraas
  • 3
  • 3
7 Comments
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 18796707
What version VB.Net?
0
 

Author Comment

by:Fraas
ID: 18798116
I use .net 2.0
0
 
LVL 19

Expert Comment

by:Desp
ID: 18798148
See the My.Computer.FileSystem.CopyFile Method ,,,specifically the showUI Parameter which shows the current progress for u
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Author Comment

by:Fraas
ID: 18798888
ohh ... this will show the system Dialog .. I need to create my onw Dialog + Progress

thanks all
0
 
LVL 19

Accepted Solution

by:
Desp earned 500 total points
ID: 18799016
You have to do it yourself then...
see the link
http://www.thescripts.com/forum/thread516498.html
start looking from the 4th comment
0
 

Author Comment

by:Fraas
ID: 18799047
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
 
LVL 19

Expert Comment

by:Desp
ID: 18799127
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

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question