Skip to content

Instantly share code, notes, and snippets.

@shanselman
Created September 26, 2019 20:48
Show Gist options
  • Select an option

  • Save shanselman/9a5f73071e41b46dfcf9585ed5e14085 to your computer and use it in GitHub Desktop.

Select an option

Save shanselman/9a5f73071e41b46dfcf9585ed5e14085 to your computer and use it in GitHub Desktop.
#CHECK THE PATH ON LINE 2 and the FEED on LINE 3
cd "C:\users\scott\Downloads"
$a = ([xml](new-object net.webclient).downloadstring("https://channel9.msdn.com/Series/CSharp-101/feed/mp4"))
$a.rss.channel.item | foreach{
$url = New-Object System.Uri($_.enclosure.url)
$file = $url.Segments[-1]
$file
if (!(test-path $file)) {
(New-Object System.Net.WebClient).DownloadFile($url, $file)
}
}
@peterneave
Copy link
Copy Markdown

Script no longer works as original link been shutdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment