Documente Academic
Documente Profesional
Documente Cultură
#Downloadthesourcelistofbooks
$downLoadList="http://ligman.me/2tk1D2V"
$bookList=Invoke-WebRequest$downLoadList
#Convertthelisttoanarray
[string[]]$books=""
$books=$bookList.Content.Split("`n")
#Removethefirstline-it'snotabook
$books=$books[1..($books.Length-1)]
$books#Here'sthelist
#Downloadthebooks
foreach($bookin$books)
{
else
else
{
} # end try
catch
$msg = "There was an error downloading $title. You may wish to try to download
this book manually."
Write-Host $msg -ForegroundColor Red
if ($log -eq $true) { "`n$($msg)" | Add-Content $logFile }
} # end catch
} # end foreach
# Let user know we're done, and give a happy little beep
# in case they aren't looking at the screen.
"Done downloading all books"
[Console]::Beep(500,300)