AutoHotkey Community

It is currently May 27th, 2012, 12:52 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: December 28th, 2009, 8:07 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 28th, 2009, 10:33 pm 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
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!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 28th, 2009, 10:55 pm 
Offline

Joined: October 3rd, 2007, 9:32 pm
Posts: 157
Location: UK
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 1:17 am 
Offline

Joined: October 26th, 2009, 6:29 am
Posts: 362
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!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], WillTroll, XstatyK and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group