Page 1 of 1

Upload Sample.scpt not working

Posted: Tue Oct 28, 2008 11:23 pm
by Daimz
Hi I am having trouble geting the Upload Sample.scpt working. I have never uses applescript befor and I am finding this a little tricky. I got the iPhoto script working.
could someone please run me through how to set it up the read me was a bit vague for me.

Re: Upload Sample.scpt not working

Posted: Thu Oct 30, 2008 2:30 pm
by todivefor
I can't get it to work either. I drop a file on the folder, it starts up cyberduck, and asks for password. I give it the password and nothing. I get the following in the MAC OSX console log:

10/30/08 9:57:11 AM Cyberduck[2910] An exception was thrown during execution of an NSScriptCommand...
10/30/08 9:57:11 AM Cyberduck[2910] java/lang/NullPointerException
Stack Trace:
at ch.cyberduck.core.ftp.FTPSession.setStatListSupportedEnabled(
at ch.cyberduck.ui.cocoa.CDBrowserController.handleMountScriptCommand(

10/30/08 9:57:11 AM [0x0-0xe50e5].ch.sudo.cyberduck[2910] 2008-10-30 09:57:11,668 [main] WARN - Forced to close socket Socket[,port=21,localport=50961]
10/30/08 9:57:11 AM [0x0-0xe50e5].ch.sudo.cyberduck[2910] 2008-10-30 09:57:11,669 [main] INFO - No data channel to interrupt

MAC OSX 10.5.5, Cyberduck 3.0.3, upload to Comcast

Any help?

Re: Upload Sample.scpt not working

Posted: Sat Jan 03, 2009 9:20 pm
by ccp
hi @ all,
I've written a variation of the script that is to be used with one or more files instead of a hotfolder.
- open the script in Scripteditor
- replace the properties at the beginning of the script with your own parameters
- save the script as a programm
- just drop the file(s) to be transferred on the (script-)programm

hope it works for you / greetz

Script starting here:
property theServer : "server-name-here"
property theUser : "user-here"
property thePW : "password-here"
property theProtocol : "ftp"
property theUploadFolder : "upload-folder-here"

on open fileList
set the item_count to the number of items in the fileList
if the item_count is greater than 0 then
with timeout of 300 seconds
tell application "Cyberduck"
set theBrowser to (make new browser)
tell (theBrowser)
set encoding to "UTF-8"
connect to theServer with protocol theProtocol as user theUser with password thePW
end tell
tell application "Finder"
repeat with i in fileList
set i to i as alias
tell application "Cyberduck"
tell (theBrowser)
upload item i
end tell
end tell
end repeat
end tell
end tell
end timeout
end if
end open