﻿# encoding: utf-8
# api: powershell
# title: RSS Enclosure Downloader
# description: RSS Enclosure Downloader
# version: 0.1
# author: halr9000
# license: CC0
# x-poshcode-id: 632
# x-archived: 2012-10-25T21:50:05
# x-published: 2008-10-09T20:52:00
#
# (found here: http://www.therightstuff.de/2008/07/25/RSS+Enclosure+Downloader+In+PowerShell.aspx)
#
# author: Alexander Groß
# http://www.therightstuff.de/2008/07/25/RSS+Enclosure+Downloader+In+PowerShell.aspx
$feed=[xml](New-Object System.Net.WebClient).DownloadString("http://the/rss/feed/url")

foreach($i in $feed.rss.channel.item) {
	$url = New-Object System.Uri($i.enclosure.url)

	$url.ToString()
	$url.Segments[-1]

	(New-Object System.Net.WebClient).DownloadFile($url, $url.Segments[-1])
}
