Link to home
Start Free TrialLog in
Avatar of razvanl
razvanl

asked on

How to copy a file from one location to another.

Hi,

I need to know how I would copy a file from one location to another in such a way that I could track it's progress.  I am assuming I may need to copy this byte by byte...

Sincerely,
Razvan L.
ASKER CERTIFIED SOLUTION
Avatar of Marsc
Marsc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Marsc
Marsc

I forgot... For the progress bar... Of course you need to calculate the %% of bytes Copied :-)

I'm sorry...

I'm not sure id the first byte position of a file is 0 or 1
So, may be the loop should be like this: For pos = 0 to filesize -1

>>open it in a binary way, and copy byte per byte. But I think it is very slow.

Of course, the operation will be a turtle if you make it as you say: byte per byte. But you can create a much bigger buffer (let's say, 10 Kb), and the process will be much faster.
what about me.