| View previous topic :: View next topic |
| Author |
Message |
tuna
Joined: 03 Oct 2007 Posts: 155 Location: UK
|
Posted: Mon Dec 28, 2009 7:07 pm Post subject: Getting file copy/move speed |
|
|
Is it possible to access information on the speed at which a file is being written during a file operation? Many scripts have relied upon simply timing the file operation itself then dividing the file size by the result, but this can only be done upon completion of the operation.
I can only think of splitting a file up into a number of arbitrarily small files so that calculations can be made after each smaller file is operated upon, and merging the small files together at the end. But I presume this would increase the overall time for the operation considerable, especially if the quantity of files or file sizes were large.
I think I'm probably missing a trick here so if anyone can point me in the right direction, I'd be very grateful.
Thanks |
|
| Back to top |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
Posted: Mon Dec 28, 2009 9:33 pm Post subject: |
|
|
To find the time it takes to write a file, I would do it this way:
| Code: |
;Pseudo-Code
;Not real code
FileApeend,somefile
start:=A_TickCount
Loop
{
If fileexists
break
}
TotalTime:=A_TickCount-Start
Get the file size
Divide the file size by TotalTime
This gives you the average time per byte. |
I get a feeling this isn't what you mean, but without a clearer explanation I can't help more than this. _________________ Check out the new AHK forum competition! |
|
| Back to top |
|
 |
tuna
Joined: 03 Oct 2007 Posts: 155 Location: UK
|
Posted: Mon Dec 28, 2009 9:55 pm Post subject: |
|
|
| Thanks - what I mean is, for example, when my script is copying a 4GB file, I can get info on how many MB/s the file is currently copying at. |
|
| Back to top |
|
 |
Ace Coder
Joined: 26 Oct 2009 Posts: 361
|
Posted: Tue Dec 29, 2009 12:17 am Post subject: |
|
|
I don't know off the top of my head, and 10 minutes of Googling has yielded nothing useful.
I don't have the time to really find your answer at this time, maybe next month.
If I did have the time I would use Google and the Microsoft website.
Here are some keywords that may be useful:
Download Rate
Download Speed
Bytes Per Second
Kb/s
Good Luck. _________________ Check out the new AHK forum competition! |
|
| Back to top |
|
 |
|