4 December 2008 @ 19:20Applescript File Downloader
Here is a little Applescript that I threw together for the sole purpose of scheduling downloads of large files for times when it doesn’t matter if it slows my internet to a crawl (e.g. at night while I’m sleeping).
The cool thing about this script is that you can create an iCal even that has a repeating schedule and attach this script to the alarm options. Then every day at the scheduled time, the script will run and download any URLs that you have in the download list. The list is cleared after each downloaded item, so it won’t repeatedly download duplicate files.
Here is the script. You can either copy and paste the text below in Script Editor or click here: Applescript File Downloader
Here is a basic summary of the script. First, the complete path to your download list must be entered for the property DownloadFileList. This download list should have each url on a separate line and saved as plain text. Next, the script reads the download list, and then builds a temp file containing the commands to download the URLs one at a time, followed by their removal from the download list text file. Lastly, the temp file is removed.
It would have been much easier to have the script open a new Terminal window for each URL and download all URLs simultaneously, but I decided that it might be best to have each download finish faster than to slow them all down by downloading all at once.
There is a lot of room for improvement in this script, but it should provide some functionality and maybe spur some interesting Applescript ideas from you.