• 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: Downloading a file from the internet with a URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Downloading a file from the internet with a URL


  • Subject: Re: Downloading a file from the internet with a URL
  • From: Rick Gordon <email@hidden>
  • Date: Thu, 12 May 2016 12:41:27 -0700

I'm not sure that fileToDownload should be set to the quoted form.

I think that the curl -o option should work without the quoted form.

The man page gives this example (with unquoted URL):
curl -o thatpage.html http://www.netscape.com/
Rick Gordon

---------------------
On 5/12/16, 12:25 PM, Stockly, Ed wrote:

OK, this any idea why this doesn't work?


I've tried it with and without making a file before trying to download.  Not sure about the –o and –O options.


______



set fileToDownload to quoted form of ("http://support.apple.com/kb/HT1582?viewlocale=fr_FR")


set filePath to (choose file name)

set openFile to open for access filePath with write permission

close access openFile


set filePath to POSIX path of filePath

set myFile to quoted form of (filePath as text)


set XMLbrut to do shell script "curl -o " & filePath & " " & fileToDownload


set myFile to quoted form of ((filePath as text) & -1)


set XMLbrut to do shell script "curl -O " & filePath & " " & fileToDownload


___________________________________________
RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________
WWW: http://www.shelterpub.com
 _______________________________________________
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

  • Follow-Ups:
    • Re: Downloading a file from the internet with a URL
      • From: "Stockly, Ed" <email@hidden>
References: 
 >Re: Downloading a file from the internet with a URL (From: Steve Mills <email@hidden>)
 >Re: Downloading a file from the internet with a URL (From: "email@hidden" <email@hidden>)
 >Re: Downloading a file from the internet with a URL (From: Yvan KOENIG <email@hidden>)
 >Re: Downloading a file from the internet with a URL (From: "Stockly, Ed" <email@hidden>)
 >Re: Downloading a file from the internet with a URL (From: "Stockly, Ed" <email@hidden>)

  • Prev by Date: Re: Downloading a file from the internet with a URL
  • Next by Date: Re: Downloading a file from the internet with a URL
  • Previous by thread: Re: Downloading a file from the internet with a URL
  • Next by thread: Re: Downloading a file from the internet with a URL
  • Index(es):
    • Date
    • Thread