Follow

PowerShell wget alias:

Function CD04([string]$url)
{
  [string]$filename = Split-Path ([uri]$url).LocalPath -leaf

  [string]$_pwd = Get-Location

  [string]$save_path =  "$_pwd\$filename"

  echo $url
  echo $save_path

  Invoke-WebRequest $url -OutFile $save_path
}

Set-Alias -Name wget -Value CD04
· · Web · 0 · 0 · 2
Sign in to participate in the conversation
小森林

每个人都有属于自己的一片森林,也许我们从来不曾走过,但它一直在那里,总会在那里。迷失的人迷失了,相逢的人会再相逢。愿这里,成为属于你的小森林。