I'm trying to make a script which will recursively upload all the files and folders from a folder on my machine to a remote server. So far, I've successfully got a script working that can upload one file if I hard code that file name. I now want something that will accept a directory name, and then recurse through all the files of that directory and upload them, obviously maintaining the directory structure.
tell application "Cyberduck"
set theServer to "domain.com"
set theUser to "user"
set thePassword to "password"
set theProtocol to "ftp"
set theRemoteFolder to "public_html"
set theLocalFolder to "~/Desktop/My Folder/"
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 with password thePassword
change folder to theRemoteFolder
-- Upload steps...
disconnect
end tell
end timeout
end tell