Apple Script

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
Rwells
Harmless
Posts: 1
Joined: Mon Dec 01, 2008 7:24 pm

Apple Script

Post by Rwells »

I am trying to make a apple script to upload a zip file.

My script looks like this

tell application "Cyberduck"
activate
set theServer to "XXXXXXXXXXXX"
set theUser to "XXXXXXXXXX"
set thePassword to "XXXXXXXXXXX"
set theProtocol to "ftp"
set Filename to "Macintosh HD/Users/rogerwells/Desktop/Archive.zip"
set theBrowser to (make new browser)

tell (theBrowser)
set encoding to "UTF-8"
connect to theServer with protocol theProtocol as user theUser with password thePassword
upload file Filename
disconnect
end tell

end tell

I get logged on OK but get this message

Cyberduck got an error: Can’t get file "Macintosh HD/Users/rogerwells/Desktop/Archive.zip" of browser 1.

I have tried several methods of FileName but no sucess. There is a file Archive.zip on my desktop.

Help
Thanks
Roger
ccp
Harmless
Posts: 2
Joined: Sat Jan 03, 2009 8:32 pm

Re: Apple Script

Post by ccp »

hi Roger,
if you haven't solved it yet you may try this:

change
set Filename to "Macintosh HD/Users/rogerwells/Desktop/Archive.zip"
to
set theFile to "Macintosh HD:Users:rogerwells:Desktop:Archive.zip" as alias

and change
upload file Filename
to
upload item theFile

hope this works & greetz
ccp
Locked