• 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: Emmanuel LEVY <email@hidden>
  • Date: Fri, 13 May 2016 13:19:43 +0200

For those interested, if you need to download some html file, you can use Smile's readtext command, like in:

----
writetext (readtext "https://support.apple.com/fr-fr/HT1582";) to "/Users/emmanuel/Desktop/downloaded-file.html"
----

Best,
Emmanuel

On May 13, 2016, at 1:58 AM, Stockly, Ed wrote:

>
>>
>> Note that the curl script will download one file, if you want the
>> pictures or other kind of files, you have to find them and download them
>> separately.
>>
>
> That's good to know. In this case I'm simply downloading zip files and
> pdfs, so all I need is the one file with each download.
>
>
> Here's the handler I'll be using, with handler calls:
>
>
> set fileToDownload to "https://support.apple.com/fr-fr/HT1582";
> set localPath to "/Users/user/myLocalFileName6.html"
> DownloadFile(fileToDownload, localPath)
> set localPath to "/Users/user/myLocalFileName7.html"
> DownloadFile(fileToDownload, localPath)
> set localPath to "/Users/user/myLocalFileName8.html"
> DownloadFile(fileToDownload, localPath)
>
> on DownloadFile(fileToDownload, localPath)
> 	set fileToDownload to quoted form of fileToDownload
> 	set quotedlocalPath to quoted form of localPath
> 	set downloadShell to "curl " & fileToDownload & " >> " & quotedlocalPath
> 	set shellResult to do shell script downloadShell
> 	delay 2
> 		tell application "System Events" to set localPath to POSIX file
> localPath as alias
> 		tell application "Finder" to reveal localPath
> 		return localPath
> 	on error errMsg
> 		return errMsg
> 	end try
> end DownloadFile
>
>
> _______________________________________________
> 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


 _______________________________________________
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: Christopher Stone <email@hidden>
    • Re: Downloading a file from the internet with a URL
      • From: Enrique Terrazas <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>)
 >Re: Downloading a file from the internet with a URL (From: Rick Gordon <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: Deivy Petrescu <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: Deivy Petrescu <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