Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File copy estimated time of completion

Status
Not open for further replies.

FK122

Programmer
May 6, 2005
6
CA
Hi guys,

I'm trying to write a script to copy a file from a network source to a local hard drive, and determine how long it will take. The idea behind this is to determine if there's some problem with some upper level switches. The file should copy in ~30 seconds or so, maybe a minute on older machines, so if the estimated time of completion is much higher than that (say ten minutes or so), then there's a problem.

I don't want the user to have to wait the full ten minutes to see if there's a problem on his end, so I'd like to check the estimated time for the file to finish copying without wasting the full copy time.

Any ideas?

Thanks,
FK
 
the only idea that I can think of would be to use a shell command to do the copy then look at the original file size and the copy file size and calculate a rate and estimated time of completion.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Robocopy will give you a percentage complete during a copy. You can get Robocopy from the Windows Server 2003 Resource Kit Tools.
 
But I don't think it gives an estimated completion time does it?

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
True. I thought that the percentage complete would give an idea of the rate of copying.

Alternatively the Robocopy /ETA switch will give the estimated time of arrival when copying files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top