• 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: Another Shell Script question ftp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Another Shell Script question ftp


  • Subject: Re: Another Shell Script question ftp
  • From: Bernardo Hoehl <email@hidden>
  • Date: Wed, 8 Feb 2006 10:02:16 -0200

Hi Ed!


I think, you can not use an interactive command such as FTP, via do shell script. Please someone currect me if I am wrong.


++++++++++++++

From TN2065:

Q: How do I control an interactive tool like ftp or telnet with do shell script?

A: The short answer is that you don’t. do shell script is designed to start the command and then let it run with no interaction until it completes, much like the backquote operator in Perl and most Unix shells.

However, there are ways around this. You can script Terminal and send a series of commands to the same window (though this only works in Mac OS X 10.2 and later), or you could use a Unix package designed for scripting interactive tools, such as expect. Also, many interactive commands have non-interactive equivalents. For example, curl can substitute for ftp in most cases.

++++++++++++++

I see that you are using options in your FTP command that will try to workaround the ftp's "interactivity", please let me know if you have any success...

I would sugest you to use "rsync" instead, create an SSH key, and just syncronize your remote and local folders. But that, of course, depends on your remote server's admin is willing to grant you SSH access. (My ISP provider won't)

I have some LAN services that work perfectly OK here, using this principle. Some servers are Linux boxes... No problem.

Hope this helps.

Bernardo Höhl
Rio de Janeiro - Brazil

===============
On 07 Feb, 2006, at 10:05 PM, Stockly, Ed wrote:

I'm writing a script that's picking up a file reference and needs to ftp the file to specific address based on info found in the file.

I'm wondering if anyone else has experience using shell script to upload files via ftp.

Here's what I'm using now:

do shell script "ftp -R -u " & myUserid & " -p " & myPassword & " " & myServer & " " & myRemotePath & myFile
What I'm hoping for is a solid, stable command that will allow me to trap errors.


Any suggestions? Anything to lookout for?

Thanks

ES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Another Shell Script question ftp (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Applescript-users Digest, Vol 3, Issue 79
  • Next by Date: Font issue in quark
  • Previous by thread: Re: Another Shell Script question ftp
  • Next by thread: Fwd: Another Shell Script question ftp
  • Index(es):
    • Date
    • Thread