applescript - uploading files with a loop using list

The Cyberduck forums have moved to Google Groups, this forum is read only.
Locked
eisenstein
Harmless
Posts: 1
Joined: Fri Jun 13, 2008 1:20 pm

applescript - uploading files with a loop using list

Post by eisenstein »

Hi

I'm having troubles with uploading files using Applescript:

Code: Select all


-- previously I generate a list myUploadSubFolder, containing Paths of desired documents
--  {"VolumeXY:SubFolder:Subfolder:Filename.suffix", "VolumeXY:SubFolder:Subfolder:Filename.suffix"}  ......


tell application "Cyberduck"
	set theBrowser to (make new browser)
		tell (theBrowser)
		set encoding to "UTF-8"
		connect to ftpHost with protocol "ftp" as user ftpUser with password ftpPass with initial folder ftpUploadFolder

	repeat with theFile from 1 to count of myUploadSubFolder
		try


			set myfile to item theFile of myUploadSubFolder
			upload myfile


		on error errmesg number errnum
			display dialog (errnum as text) & ": " & errmesg & ¬
			return & return & "Applet quitting."
			return
		end try
	end repeat
Cyberduck connects to the FTP-folder but the script returns an error number -1715.
How can I correctly upload the files?

thanks

eisenstein
Locked