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