Brainfarts Uncategorized Powershell scripts

Powershell scripts

This post was most recently updated on December 11th, 2018

rtlupdate.cmd

@echo offf:cd\cd werkmap\seriesdel uzg.xmlpowershell -file add-text.ps1 >serieslist.txtpowershell -file download_all.ps1del series.txtdel serieslist.txtdel temp.xml

add-text.ps1

#Define Variables$a = "f:\werkmap\series\series.txt"$b = get-content $a#Define Functionsfunction append-text {   process{   foreach-object {$_ + "index.xml"}    }   } #Process Code$b | append-text

 download_all.ps1

$destination = "f:\werkmap\series\temp.xml"$client = new-object System.Net.WebClientforeach ($i in $a) {    [xml]$client.DownloadFile( $i, $destination )	add-content -path uzg.xml -value (get-content $destination)#	type $destination	}

Related Post