Skip to content

Instantly share code, notes, and snippets.

@colindekker
Created March 20, 2020 19:07
Show Gist options
  • Save colindekker/fd4f2f5b8a387608b48e62bf6a97440e to your computer and use it in GitHub Desktop.
Save colindekker/fd4f2f5b8a387608b48e62bf6a97440e to your computer and use it in GitHub Desktop.
$d="c:\samples";mkdir $d;cd $d;Invoke-WebRequest -Uri "https://gist.githubusercontent.com/colindekker/c3e892355f041910af2c4cad40621ddc/raw/8e18d947bc050fcb51031437deae654712e8f287/gistfile1.csv" -OutFile "samples.csv";$p = 1;Import-Csv .\samples.csv |% {$u = $($_.Url);$n=$($p.ToString().PadLeft(3, "0") + " - " + $_.Url.split("/")[-1..-1]);Invoke-WebRequest -Uri $u -OutFile $n;$p = $p + 1;};explorer $d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment