View Single Post
  #1 (permalink)  
Old 05-09-2008, 01:08 AM
ukmartinb ukmartinb is offline
Junior Member
 
Join Date: Jan 2008
Location: Bristol, UK
Posts: 4
Send a message via AIM to ukmartinb
Cool Automate the duration of a download and upload

I need some help streamlining a well used script I have developed:

I have a task which carries out 2 separate sequential operations:

1) Go to a Internet Page that performs a DSL Speedtest, copy the Upspeed and Downspeed and paste the results into a custom built webform (that backs onto a MySQL DB)

2) Then

a) Perform a HTTP download from a web server, (preconfigured to download to the desktop)

b) A partial file appears under the actual file being downloaded during the download, I'm monitoring for when that file is downloaded by checking when the partial file is deleted by the OS (using "Check for Screen Change" command)

c) Recording the Created and Modified times from the properties of the downloaded file, then pasting these value into my same MySQL db.

To me, this seems complicated and the data scrape from the speedtest webpage is an unnecessary and unscientific test in my script. And here's why:

As the file size, location and conditions are unchanged every time, by collecting the download duration I can use a formula to work out the speed of my transfers.

I am unsure of how to script an upload using a similar process to my upload, ie initiate an http or FTP upload, wait for the upload to complete on the server and attempt to obtain the start - finish time of the upload.

Ideally, does anyone have a method or script that will

Automatically initiate a download and upload recording the start time, end time OR the actual duration in seconds of the file transfer?

Thanks

Martin

Last edited by ukmartinb : 05-09-2008 at 01:10 AM. Reason: Added new relevant information to the request
Reply With Quote