Re: scripting ftp in the terminal
Re: scripting ftp in the terminal
- Subject: Re: scripting ftp in the terminal
- From: Simon Forster <email@hidden>
- Date: Wed, 16 Oct 2002 13:35:50 +0100
On Tuesday, October 15, 2002, at 08:31 PM, Robert Lyons wrote:
I'm new to the list and I'm trying to write a script that will open up
the terminal ftp application, pass my ftp user name and password and
then upload the file to that directory. So far, i have not been able
to pass the user name and password even though I have been able to ftp
to my server...
Having used URL Access Scripting under Classic Mac, now I avoid it like
the plague although Emmanuel may be right in that it makes your life
easier. It's just that I've always found the opposite!
Via the terminal you will probably want to use do script and cURL. cURL
is a default install with OS X and allows you to play with URLs. Take a
look at the man pages (terminal -> type "man curl" without the quotes)
and also cURLs web site (given at the bottom of the man page). However,
this works for me to fetch a file:
do shell script "curl -u username:password
ftp://123.456.789.1/directory/directory/file.txt -o Desktop/file.txt"
HTH
Simon Forster
_________________________________________________
BabelFix Ltd, Office One, 16 Canham Road, London, W3 7SR, UK
<tel int="+44 20 8746 0555" uk="020 8746 0555">
<tel int="+44 70 9230 5244" uk="070 9230 5244">
<fax int="+44 70 9230 5247" uk="070 9230 5247">
<
mailto:email@hidden>
_________________________________________________
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.