Created
July 10, 2015 21:05
-
-
Save sweeneyrobb/741bd86ac96aa344ba9f to your computer and use it in GitHub Desktop.
Download a list of files to output directory. Current out directory is set to current working directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$outDir = "." | |
@( | |
"http://domain/images/image1.jpg", | |
"http://domain/images/image2.jpg", | |
"http://domain/images/image3.jpg", | |
"http://domain/images/image4.jpg", | |
"http://domain/images/image5.jpg", | |
"http://domain/images/image6.jpg", | |
) | %{ | |
$uri = [uri]$_ | |
$outFile = Join-Path $outDir ($uri.Segments[$uri.Segments.Count-1]) | |
Invoke-WebRequest -Uri $uri -OutFile $outFile | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment