Skip to content

Instantly share code, notes, and snippets.

@kaloyan-raev
Created July 22, 2015 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaloyan-raev/70b59abdb4bd52b5ec14 to your computer and use it in GitHub Desktop.
Save kaloyan-raev/70b59abdb4bd52b5ec14 to your computer and use it in GitHub Desktop.
PowerShell script for downloading an Eclipse update site
Function DownloadFile($path) {
$url = "http://downloads.zend.com/studio-eclipse/updates/380/" + $path
Write-Output "Downloading $url"
$output_dir = Convert-Path .
$output_path = Join-Path $output_dir $path
$start_time = Get-Date
$wc = New-Object System.Net.WebClient
$wc.DownloadFile($url, $output_path)
Write-Output "Finished in $((Get-Date).Subtract($start_time).Seconds) second(s)"
}
$total_start_time = Get-Date
DownloadFile "files.lst"
mkdir binary
mkdir features
mkdir plugins
Get-Content "files.lst" | foreach { DownloadFile $_. }
Write-Output "Total time: $((Get-Date).Subtract($total_start_time).Seconds) second(s)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment