Asuming.net is installed, you can combine C # with a batch file to create wget.cmd:
/* @echo off && cls if '%2'=='' ( echo usage: %0 url filename goto :eof ) set WinDirNet=%WinDir%\Microsoft.NET\Framework IF EXIST "%WinDirNet%\v2.0.50727\csc.exe" set csc="%WinDirNet%\v2.0.50727\csc.exe" IF EXIST "%WinDirNet%\v3.5\csc.exe" set csc="%WinDirNet%\v3.5\csc.exe" IF EXIST "%WinDirNet%\v4.0.30319\csc.exe" set csc="%WinDirNet%\v4.0.30319\csc.exe" %csc% /nologo /out:"%~0.exe" %0 "%~0.exe" "%1" "%2" del "%~0.exe" goto :eof */ using System; using System.Net; using System.IO; class MyWget { static void Main(string[] args) { WebClient wc = new WebClient(); wc.DownloadFile(args[0],args[1]); } }
source share