Page 1 of 1

Apple Script

Posted: Mon Dec 01, 2008 7:28 pm
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

Re: Apple Script

Posted: Sat Jan 03, 2009 8:42 pm
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