Created
August 27, 2010 20:27
-
-
Save t0yv0/554136 to your computer and use it in GitHub Desktop.
This file contains 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
# Downloads a file from a given URL to the current directory. | |
function wget($url) | |
{ | |
$path = $url.Substring($url.LastIndexOf('/') + 1) | |
$dir = pwd | |
$location = [System.IO.Path]::Combine($dir, $path) | |
$client = new-object System.Net.WebClient | |
$client.DownloadFile($url, $location); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment