0

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>
Harsh Sengar
  • 95
  • 1
  • 9

1 Answers1

1

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

Technext
  • 7,887
  • 9
  • 48
  • 76
  • Also could you suggest how should I parameterize ? – Harsh Sengar May 29 '20 at 10:29
  • That's a separate question. See if this plugin fulfills your purpose: https://plugins.jenkins.io/filesystem-list-parameter-plugin/ OR if this link helps: https://stackoverflow.com/questions/42224691/how-to-use-file-parameter-in-jenkins – Technext May 29 '20 at 11:49