Sync Sample Script

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
sms26
Harmless
Posts: 1
Joined: Wed Feb 14, 2007 7:34 pm

Sync Sample Script

Post by sms26 »

The following sample script always prompts the user to press the 'syncronize' button. Is it possible to change the functionality so that the operation is silent.

Code: Select all

tell application "Cyberduck"
	set theServer to "my.ftp.co.uk"
	set theUser to "anonymous"
	set theProtocol to "ftp"
	set theRemoteFolder to "/mirror/source"
	set theLocalFolder to "_backups/"
	
	set theBrowser to (make new browser)
	with timeout of 300 seconds
		tell (theBrowser)
			set the encoding to "UTF-8"
			set show hidden to false
			connect to theServer with protocol theProtocol as user theUser
			change folder to theRemoteFolder
			sync folder (get working folder) with local folder theLocalFolder
			disconnect
		end tell
	end timeout
end tell
Thanks.
Locked