math.ocw.nctu | basic.mathematics

$wc = New-Object system.net.webclient
$data = $wc.DownloadData("http://ocw.nctu.edu.tw/riki_detail.php?pgid=183&cgid=3")
$utf8 = [system.text.encoding]::getencoding("utf-8")
$page = $utf8.GetString($data)
$REGEX = [regex] "<a href=`"\.\.\/\.\.(?<URL>\/.*\/(?<NM>.*\.pdf))`" target=`"_blank`">"
$mes = $REGEX.Matches($page)
$MES | %{
 $wc.DownloadFile("http://ocw.nctu.edu.tw" + $_.Groups["URL"], "C:\" + $_.Groups["NM"])
}
ċ
basic.math.rar
(1852k)
Unknown user,
Mar 4, 2012, 10:56 PM
Comments