Re: Scripting Terminal for simple FTP
Re: Scripting Terminal for simple FTP
- Subject: Re: Scripting Terminal for simple FTP
- From: Andrew Oliver <email@hidden>
- Date: Tue, 01 Apr 2003 10:21:36 -0800
That's exactly how 'do shell script' works. It takes a single command and
sends it to a new shell. There is no interaction with that command while
it's running.
In short, you can't use 'do shell script' to interact with a terminal.
However, there shouldn't be any reason why you can't use curl. Its syntax is
pretty straightforward.
Assuming you want to download the file /path/to/filename.txt from the server
ftp.some.com, using username "me" and password "mypass":
do shell script "curl -u me:mypass
ftp://ftp.some.com/path/to/filename.txt"
Andrew
:)
On 4/1/03 9:51 AM, "John Tuttle" <email@hidden> wrote:
>
I've been trying to script the Terminal to FTP a file to another server.
>
>
I've only had success giving the Terminal a single command. Anything
>
following is entered in a new window.
>
>
tell application "Terminal"
>
do script "ftp <ftp login>"
>
end tell
>
>
The Terminal dictionary is a bit limited as far as explanations go and
>
haven't been able to find any examples.
>
>
I tried the curl script posted last week and got nowhere.
>
>
Any takers?
>
>
--
>
John Tuttle
>
_______________________________________________
>
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.
_______________________________________________
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.