Timed download with URL Access
Timed download with URL Access
- Subject: Timed download with URL Access
- From: Jeremy Reichman <email@hidden>
- Date: Tue, 07 Aug 2001 16:33:11 -0400
I have to do some testing of a number of wireless cards, and one of the
tests will be relative download speed of a pre-specified file on a local FTP
server. I figured URL Access and AppleScript would make this a lot better,
and that this would also be useful to others.
However, using the following (and substituting in your own FTP URL and file
name), I get an error in the "download" command. I know I've had problems
like this before -- when I wrote a script to download Virex updates -- but I
can't remember how I got around them, and my source from that project hasn't
helped me yet.
I get different errors depending on which set of comment marks ("--") I
remove from the download command.
Any ideas? I'm feeling sufficiently stupid right now, so I resort to the
wisdom of others. (If I could figure out coercion and list manipulation, I'd
probably solve half of my problems.)
***
set download_file to "
ftp://ftp.server.com/insertfilename"
set start_time to (the current date)
tell application "URL Access Scripting"
download download_file to (file "Macintosh HD:insertfilename") --
replacing yes with progress -- without unpacking, directory listing,
download directory and authentication
end tell
set end_time to (the current date)
set download_time to (end_time - start_time)***
Any idea what could be causing the download to fail?
I'd also like to figure out how many kb/sec are being downloaded and such,
but once I get the above problem cracked, I should be able to get the data
size of the downloaded file from the Finder, and then do some simple
arithmetic and a nice display dialog, too. :)
--
Jeremy Reichman
Software Specialist III (Mac OS) / Instructor
Customer Support Services
Information and Technology Services
Rochester Institute of Technology
Rochester, New York, USA