• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
URL Access Scripting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: URL Access Scripting
      • From: JollyRoger <email@hidden>
    • Re: URL Access Scripting
      • From: JollyRoger <email@hidden>
  • Prev by Date: Re: Alternatives to Word (was: Re: Script problems with BBEdit 6.5)
  • Next by Date: Re: Downloading .csv file via Javascript link
  • Previous by thread: Re: Scripting Remote Access
  • Next by thread: Re: URL Access Scripting
  • Index(es):
    • Date
    • Thread