• 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
Re: Scripting Terminal for simple FTP
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Terminal for simple FTP


  • Subject: Re: Scripting Terminal for simple FTP
  • From: Nigel Smith <email@hidden>
  • Date: Thu, 03 Apr 2003 15:52:08 +0100

On 3/4/03 15:21, "Chris Janton" <email@hidden> wrote:

> On Tuesday, April 1, 2003, at 11:00 PM,
> email@hidden wrote:
>
>> In this specific case, the question related to controlling the ftp
>> connection, and that can't be done, even with semi colon-separated
>> commands
>> passed in the 'do shell script'.
>
>
> tell application "Terminal"
> set myIndex to (get the index of every window whose name is "my test
> window")
> do script "ftp foo.com" in window myIndex
> do script "user bar" in window myIndex
> do script "xyzzy" in window myIndex -- this is the password
> do script "ls P*" in window myIndex
> do script "exit" in window myIndex
> end tell

Way too many do scripts for my poor brain to handle :-)

How's about (for example):

set theScript to "ftp -n [machine-name]
user [username] [password]
cd /var/www/htdocs/nigel_test
ls
lcd ~/Desktop
bin
get vars_ssi_test.shtml"

tell application "Terminal"
do script theScript
end tell

Works over here on OSX 10.2.4, though you'll want to change the ftp commands
to do your own thing...

Nigel
_______________________________________________
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.

  • Follow-Ups:
    • Re: Scripting Terminal for simple FTP
      • From: Andrew Oliver <email@hidden>
References: 
 >Re: Scripting Terminal for simple FTP (From: Chris Janton <email@hidden>)

  • Prev by Date: Re: Mail.app: Reindexing Inbox
  • Next by Date: Re: Scripting Terminal for simple FTP
  • Previous by thread: Re: Scripting Terminal for simple FTP
  • Next by thread: Re: Scripting Terminal for simple FTP
  • Index(es):
    • Date
    • Thread