URL Access Scripting
URL Access Scripting
- Subject: URL Access Scripting
- From: Eric Schult <email@hidden>
- Date: Fri, 07 Dec 2001 13:02:55 -0600
I'm writing a little script using the URL Access Scripting OSAX that'll
allow users to upload a file to an anonymous FTP site. It works, except for
the following complication:
Because the anonymous ftp requires any email address for a password, the
presence of an "@" (at) symbol in the password seems to confuse the
following upload string:
upload localFile to "
ftp://tjt:email@hidden@ftpads.journaltimes.com/" ...
I get an "error type -3170", which I presume means the server misinterpreted
the first "@" (at) symbol for the break between the userName:password and
the ftp address. The script works if I substitute the userName with an admin
user and put in my admin password instead of an email address.
Can anybody suggest a work-around? Thanx in advance for any help you can
provide. The script follows in its entirety.
WES
property ftpServer : "ftpads.journaltimes.com"
property ftpPath : ""
property userName : "tjt"
property ftpPassword : ""
tell application "Finder"
set localFile to choose file with prompt ,
"Choose a file to send to the JT Dropbox."
set fileName to name of localFile
set ftpPassword to text returned of (display dialog "What's your email
address? default answer "")
end tell
tell application "URL Access Scripting"
upload localFile to (("
ftp://" & userName & ":" & ,
ftpPassword & "@" & ftpServer & "/" & ,
ftpPath) as string) replacing yes with progress
end tell