Skip to content

Instantly share code, notes, and snippets.

@t0yv0
Created August 27, 2010 20:27
Show Gist options
  • Save t0yv0/554136 to your computer and use it in GitHub Desktop.
Save t0yv0/554136 to your computer and use it in GitHub Desktop.
# 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