wget not recognized as internal or external command
Asked Answered
E

9

32

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
Epifaniaepifano answered 18/3, 2015 at 3:5 Comment(2)
Do you have wget installed?Squatness
You could use a PowerShell command instead of wget, and get rid of the 3rd party tool dependency. If I recall correctly, powershell -command "Invoke-WebRequest 'http://interversesoftware.weebly.com/uploads/4/8/5/8/48585729/aspatcher.bat' -OutFile 'aspatcher.bat'" would be the relevant syntax.Batiste
C
48

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/

Coriander answered 18/3, 2015 at 3:26 Comment(0)
E
14

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/
Electrokinetics answered 18/11, 2020 at 19:44 Comment(1)
Work for me, I would genuinely prefer Python-friendly alternative, unfortunately, it requires time to modify and write a proper function that is based on wget package and easy to use.Animatism
E
9

first you have to install wget

 pip install wget 

than in Jupiter notebook locally on Windows 10

!python -m wget

example

!python -m wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1InzR1qylS3Air4IvpS9CoamqJ0r9bqQg' -O inception.py
Eggers answered 24/10, 2022 at 11:3 Comment(0)
A
4

What this simply means is, wget isn’t installed in your windows machine or it is, but hasn’t been added to Windows environmental path.

If you don’t have wget installed, download it from here (32-bit) and here (64-bit).

Extract the files to a folder say C:\wget and then add the folder to Windows environmental path.

Amadeus answered 30/10, 2019 at 13:1 Comment(0)
S
3

The answers about it not being available by default are absolutely correct. A few other notes related to installing wget - if you use a package manager, they may have it for you to install with.. e.g.:

$ choco install wget

$ composer require fawno/wget

Saga answered 20/1, 2023 at 15:54 Comment(0)
A
2

Go to C:\Program Files (x86)\GnuWin32\bin folder and check the .exe file name. For me it was sid.exe so I'm using sid instead of Wget command

Adventurer answered 12/6, 2019 at 20:23 Comment(0)
A
2

download wget.exe here after downloading, go to command prompt by typing 'cmd' in the search menu, open the cmd type 'path' then enter in the command prompt, you're going to move the downloaded wget.exe to C:\Windows\System32 folder. if its successful, close and open the command prompt and type 'wget -h' then enter you should see different available commands. You can now use 'md wgetdown' to create directory for your downloads

Ambassador answered 18/5, 2020 at 4:32 Comment(0)
B
2

I had a similar issue, and I resolved it by using Windows PowerShell instead of Command Prompt

Command Prompt

windows Powershell

Bastardize answered 4/5, 2022 at 9:27 Comment(0)
R
1

You simply need to install wget from https://anaconda.org/menpo/wget here. I found my solution by installing it.

Roldan answered 5/11, 2020 at 11:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.