Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wget not recognized as internal or external command

I am working on a program to auto update my game as I make new developments and add new patches. When I go to run the patch update it doesn't recognize wget as a internal or external command. Game:

:Checkforupdates
    cls
    cd C:\AirlineSim\
    echo Checking for Updates
    wget "http://interversesoftware.weebly.com/uploads/4/8/5/8/48585729/aspatcher.bat"
    if /i not exist "ASpatcher.bat" (echo Could not retrieve update file.) && pause
    if exist "ASpatcher.bat" call "ASpatcher.bat"
    if exist "ASpatcher.bat" del "ASpatcher.bat"
    goto menu

More code above in the updater Updater:

cd C:\Airlinesim
echo Updating...
echo.
if /i exist Airline_Simulator.bat" del Airline_Simulator.bat
wget "http://interversesoftware.weebly.com/uploads/4/8/5/8/48585729/airline_simulator.bat")
set version=2.0
like image 523
Nate Hastings Avatar asked Mar 18 '15 03:03

Nate Hastings


2 Answers

wget is a third-party program that doesn't come bundled with Windows, so you need to explicitly install it in order to use it.

You can find (one of) the Windows versions here: http://gnuwin32.sourceforge.net/packages/wget.htm

You will need to add the path of the wget.exe file to your PATH environment variable in order to call the executable as in the batch file above without explicitly specifying the path.

For Windows 10: A good link is available here: https://builtvisible.com/download-your-website-with-wget/

like image 166
Reticulated Spline Avatar answered Oct 20 '22 05:10

Reticulated Spline


I followed this tutorial-> (https://builtvisible.com/download-your-website-with-wget/) and it worked for me. Still, I will give an overview of that, credit: Richard Baxter

  1. for 64bit version download wget from here

  2. move your wget.exe to the Windows directory, which is generally c:\Windows\System32.if you don't know then you can find that either using the $PATH command or by opening your cmd as an administrator and in which path it will open that will be your Windows directory. like this one ->

enter image description here

2.1. Check that you have copied that in a proper place or not, to do that restart your cmd/terminal then type wget -h. if it gives some output related to some commands and their utilities(basically what a help command does) then you are good to go👍.

  1. If you pass the above check, then go to your c:/ directory using cd .., then make a directory called wgetdown using md wgetdown. Now you are all set. use get how ever you want. source https://builtvisible.com/download-your-website-with-wget/
like image 6
Soumyadip Sarkar Avatar answered Oct 20 '22 05:10

Soumyadip Sarkar