Skip to content

Instantly share code, notes, and snippets.

@sunnyc7
Last active December 10, 2015 18:58
Show Gist options
  • Save sunnyc7/4478200 to your computer and use it in GitHub Desktop.
Save sunnyc7/4478200 to your computer and use it in GitHub Desktop.
Mod of doug finke's PDF downloader script to download
#Original Doug Finke's gist - https://gist.github.com/4467657
#download all scripting games code by Rohn Edwards
$url="http://2012sg.poshcode.org/Scripts/By/862"
(Invoke-WebRequest $url).links | where{$_.innerHTML -eq "Download"} | ForEach {
$outFile = "c:\temp\$($_.outerText)"
#"Downloading $($_.InnerHtml) -> $($outFile)"
$callstring = "http://2012sg.poshcode.org"+$_.href
$callstring
Invoke-WebRequest $callstring -OutFile $outFile
}
#>
<#
Doug Finke Script Mod.
Take the URL
for each URL.Links get links which are -like 2012sg.poshcode.org/number
populate that into an array
for each member in the array
call 2012sg.poshcode.org/Scripts/Get/ The number
Script is not generating the files as 4567.ps1. Will check this later.
#>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment