Advertisement
metalx1000

get web list

Jul 1st, 2014
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $wc = New-Object Net.WebClient
  2. $list = $wc.DownloadString("https://raw.githubusercontent.com/metalx1000/MyBin/master/games/nes/linux/rom.lst")
  3.  
  4. $roms = @{}
  5.  
  6. foreach ($rom in $list)
  7.  
  8.  {
  9.  
  10.   $roms.add($rom,(Get-Random -Maximum $list.count))
  11.  
  12.  } #end foreach
  13.  
  14.  
  15.  
  16. $url = ($roms.GetEnumerator() | sort{get-random} | select -First 5)
  17. $url | get-member
  18. $url.key
  19. $file = "rom.zip"
  20. #$wc.DownloadFile($url,$file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement