Created
September 18, 2011 16:20
-
-
Save colinbowern/1225231 to your computer and use it in GitHub Desktop.
Download Build 2011 Sessions using Titles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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