Advertisement
dropbox1349

ConvertFrom-String Error

Nov 19th, 2016
418
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ORIGINAL CODE
  2. -------------------------
  3.  
  4. #extract utils data and clean
  5. $listbook=gci $rootpath -File -filter *.pdf | foreach { New-Object psobject -Property @{file=$_.fullname; books= ((iwr "https://arxiv.org/abs/$($_.BaseName)").ParsedHtml.body.outerText | ConvertFrom-String -TemplateContent $template)}} | select file -ExpandProperty books |  select file,  @{N="Subject";E={Clean-InvalidPathChars $_.subject}}, @{N="Title";E={Clean-InvalidFileNameChars $_.title}}  
  6.  
  7. -----------------
  8. INTO like this ?
  9. -----------------  
  10.  
  11. #extract utils data and clean
  12. $listbook=gci $rootpath -File -filter *.pdf | foreach { New-Object psobject -Property @{file=$_.fullname; books= (($wr = iwr "arxiv.org/abs/quant-ph/9802001";;)")$outer = $wr.ParsedHtml.body.outerHTML; | $outer | ConvertFrom-String -TemplateContent $template;)}} | select file -ExpandProperty books |  select file,  @{N="Subject";E={Clean-InvalidPathChars $_.subject}}, @{N="Title";E={Clean-InvalidFileNameChars $_.title}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement