Applescripting a Download - Time out error
Posted: Tue Sep 19, 2006 5:47 am
I am creating a short script to grab two backup files off of my server and download them.
Here is the code:
when I run the code it is designed to download a file and a directory (Both meet criteria for the above If statement). It starts the download, but does not open the download processing window (that shows how the download is progressing). It does show that it is downloading the file, Lower left of the browser window. It also does not download the directory that corresponds to the if statement above.
I then get an error: AppleEvnet timed out.
I would really like to see the progress bar and how do i get ti to download the directory.
How do I get the script to not time out until the download is clear.
Thanks
Jeff
Here is the code:
Code: Select all
set downloadFolder to "~/Sites/website backups/"
set theServer to "myserver.com"
set theUser to "username"
set theProtocol to "sftp"
set homedir to "/home/username/"
tell application "Cyberduck"
set theBrowser to (make new browser)
tell (theBrowser)
set encoding to "UTF-8"
connect to theServer with protocol theProtocol as user theUser with password "password"
set theFiles to (browse folder homedir)
set itemcount to the number of items in theFiles
repeat with i from 1 to itemcount
if item i of theFiles contains "backup" then
download file (item i of theFiles) to downloadFolder
end if
end repeat
end tell
end tellI then get an error: AppleEvnet timed out.
I would really like to see the progress bar and how do i get ti to download the directory.
How do I get the script to not time out until the download is clear.
Thanks
Jeff