Created
April 20, 2016 00:01
-
-
Save a5ync/c719b17a3f390cfce6722abbd263fa4e to your computer and use it in GitHub Desktop.
Download web resources based on .txt file that contains url links
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
# download.txt | |
# http://fabricjs.com/assets/25.svg | |
# http://fabricjs.com/assets/36.svg | |
$destination="img" | |
New-Item -ItemType directory -force $destination | |
$links=Get-Content download.txt | |
foreach ($link in $links) | |
{ | |
Write-Host "Downloading "+$link | |
Invoke-WebRequest $link -OutFile ("{0}/{1}" -f $destination,$link.Substring($link.LastIndexOf("/") + 1)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment