I've been trying for 3 days to figure out the syntax for an FTP Upload custom function (downloaded from briandunning.com), but I can't get it to work. It always fails with error -2740, "an unknown token can't go here," which tells me nothing. Anyone care to check out my script and offer some pointers? I'm sure there's a syntax error, but I can't find it. I want to hard-code the username and password, but the password contains special characters (parentheses), and I'm not sure how to escape them:
i,e, ythr(i.K9)56
I've tried various escaping approaches: ythr\(i.K9\)56 , "ythr" & "\(" & "i.K9" & "\)" & "56", etc.
FTPUpload (path, directory, file)
"
set thePath to quoted form of \"ftp://<username>:<password>@ftp.remotehost.com/targetfolder/\"
do shell script \"curl -T\" path & "/" & directory & "/" & file thePath
"
Any ideas?