• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Timed download with URL Access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: RE: archives-it can't be as bad as I think it is
  • Next by Date: Re: archives-it can't be as bad as I think it is
  • Previous by thread: Re: Select desktop items for a specific volume
  • Next by thread: Files in a Folder
  • Index(es):
    • Date
    • Thread