Advertisement
metalx1000

My Wget in PowerShell

Jun 13th, 2014
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2.     Not Really WGET
  3.     This is my own powershell for basic file downloading.
  4.  
  5.     Script By Kris Occhipinti
  6.     http://filmsbykris.com
  7.     June 6th 2014
  8.     GPLv3
  9.     http://www.gnu.org/licenses/gpl.txt
  10. #>
  11.  
  12. function WGET($url){
  13.     $base = [io.path]::GetFileNameWithoutExtension("$url")
  14.     $file = [io.path]::GetFileName("$url")
  15.     Write-Output "Downloading $URL ..."
  16.    
  17.     $webclient = New-Object System.Net.WebClient
  18.     $webclient.DownloadFile($url,$file)
  19.    
  20.     Write-Output "File Downloaded"
  21. }
  22.  
  23. WGET("$args")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement