0
votes

So my problem is very weird, tried searching all around but not able to find the solution. My goal was to download something using wget using a Jenkins job. I confirmed wget works through command line, also placed wget in system32 folder, as to be invoked from anywhere. I put below command in a bat file and when I try to execute the bat file, like "E:\utilitydownload.bat" in Jenkins using Execute windows batch command, it returns 'wget' is not recognized as an internal or external command, operable program or batch file.

Content of utilitydownload.bat

E:
cd E:\wgetdownload
wget <some file on a server>
1
Provide the full-path to the wget executable in your script.Technext
C:\Windows\System32\wget.exe' is not recognized as an internal or external command, operable program or batch file.Harsh Sengar
Please don't cross-postIan W

1 Answers

1
votes

Little weird but i'm not sure why it didn't work from C:\Windows\System32. I also tried adding Path environment variable in Slave Configure section but to no avail.

However, if i keep the executable anywhere else, for example, C:\softwares\wget.exe, it works.

enter image description here

Output:

enter image description here