• 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: OT: Curl
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OT: Curl


  • Subject: Re: OT: Curl
  • From: "Mark J. Reed" <email@hidden>
  • Date: Tue, 22 Jan 2008 13:36:34 -0500

On Jan 22, 2008 12:47 PM, EU - Luca Pozzato <email@hidden> wrote:
>         repeat with remoteFile in every item of MYFILE_LIST
>                 set curlScript to "curl -f " & FTP_ADDRESS & " " & remoteFile & " -o " & quoted form of
> POSIX path of (destfoder & remoteFile)

Although that won't get a recursive hierarchy if the remote dir
contains subdirs.  curl is very useful, but the cli can be cumbersome
for this sort of thing.  For instance, it will accept multiple URLs on
the command line, but if you want each one to be saved in a like-named
file, you have to repeat the -O option once for every URL, e.g. curl
-OOO http://url1 http://url2 http://url3.

The OP might want to investigate installing wget (available via either
Fink or MacPorts).  Then you can replace the combination of "curl -l"
plus repeat loop with something like this:

do shell script "cd " & quoted form of POSIX path of destfolder & " &&
/sw/bin/wget -r " & FTP_ADDRESS

--
Mark J. Reed <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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >OT: Curl (From: Rick Dwyer <email@hidden>)
 >Re: OT: Curl (From: "EU - Luca Pozzato" <email@hidden>)

  • Prev by Date: Re: How to parse CSV
  • Next by Date: Re: How to parse CSV
  • Previous by thread: Re: OT: Curl
  • Next by thread: Re: Parsing CSV, MySQL
  • Index(es):
    • Date
    • Thread