Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.