• 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: Reinhold Penner <email@hidden>
  • Date: Thu, 3 Apr 2003 10:26:07 -1000

On Thursday, Apr 3, 2003, at 09:27 Pacific/Honolulu, Andrew Oliver wrote:

I want the script to automatically decide which file to download, although
I'll accept, at a pinch, displaying a list of filexx.txt files for the user
to choose from (although, if you can get that listing the logic to choose
the file is simple).

Well, if you don't insist on using the Terminal, it would be as simple as using curl with the -I flag:

set theURL to "ftp://ftp.machine.domain/myFolder";
set theResult to do shell script "curl -I '" & theURL & "'"

From there you can parse the modification date of theResult and download whatever you like. I use that same procedure in an application that automatically downloads the latest version of Camino. You can even traverse folders to find the latest version.

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

References: 
 >Re: Scripting Terminal for simple FTP (From: Andrew Oliver <email@hidden>)

  • Prev by Date: Re: Apropos of nothing
  • Next by Date: Re: Apropos of nothing
  • Previous by thread: Re: Scripting Terminal for simple FTP
  • Next by thread: Re: Scripting Terminal for simple FTP
  • Index(es):
    • Date
    • Thread