Skip to content

Instantly share code, notes, and snippets.

@colinbowern
Created September 18, 2011 16:20
Show Gist options
  • Save colinbowern/1225231 to your computer and use it in GitHub Desktop.
Save colinbowern/1225231 to your computer and use it in GitHub Desktop.
Download Build 2011 Sessions using Titles
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath
$a = ([xml](new-object net.webclient).downloadstring("http://channel9.msdn.com/Events/BUILD/BUILD2011/RSS/wmv"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$sessionUrl = New-Object System.Uri($_.link)
$file = $sessionUrl.segments[-1] + " - " + $_.title.Replace("""", "'").Replace(":", "-") + ".wmv"
if (!(test-path $file))
{
Write-Host "Downloading $file"
(New-Object System.Net.WebClient).DownloadFile($url, $file)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment