Skip to content

Instantly share code, notes, and snippets.

@a5ync
Created April 20, 2016 00:01
Show Gist options
  • Save a5ync/c719b17a3f390cfce6722abbd263fa4e to your computer and use it in GitHub Desktop.
Save a5ync/c719b17a3f390cfce6722abbd263fa4e to your computer and use it in GitHub Desktop.
Download web resources based on .txt file that contains url links
# 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