Applescripting a Download - Time out error

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
jklinephd
Harmless
Posts: 3
Joined: Fri Sep 15, 2006 7:01 am
Contact:

Applescripting a Download - Time out error

Post by jklinephd »

I am creating a short script to grab two backup files off of my server and download them.

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 tell
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
Locked