Download Build2013 sessions with PowerShell

Posted on 7/13/2013 @ 10:33 PM in #Vanilla .NET by | Feedback | 1915 views

Enjoyed Build 2013? I wasn’t there, I missed out on all the freebies.

But, here’s a quick and dirty script to download all the sessions. Enjoy

   1:  [Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath 
   2:  $rss = (new-object net.webclient)
   3:  $a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2013/RSS/mp4high")) 
   4:  $a.rss.channel.item | foreach{  
   5:     $url = New-Object System.Uri($_.enclosure.url)
   6:     $file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".mp4"
   7:    if (!(test-path $file)) { 
   8:          $file
   9:          $wc = (New-Object System.Net.WebClient)
  10:          $wc.DownloadFile($url, $file) 
  11:      } 
  12:  }

Sound off but keep it civil:

Older comments..