-1
  • using win10
  • can download link with IDM & chrome

I get this errors. is there anything wrong

C:\Users\alihani>cd C:\wget-1.19.1-win64

C:\wget-1.19.1-win64>wget http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT&Expires=1510149040&response-cache-control=public%2C%20max-age%3D2592000&response-content-disposition=attachment%3B%20filename%3D%22%27Til%20Death%20Season%201.rar%22&response-content-encoding=System.Text.UTF8Encoding&response-content-type=application%2Foctet-stream&Signature=FYX3YEWDXD%2Bfd5X98fzrQEjZ1vw%3D

--2017-10-09 16:52:07--  http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT
Resolving rgwha1.elcld.com (rgwha1.elcld.com)... 192.168.222.216
Connecting to rgwha1.elcld.com (rgwha1.elcld.com)|192.168.222.216|:80... connected.

HTTP request sent, awaiting response... 400 Bad Request
2017-10-09 16:52:08 ERROR 400: Bad Request.

'Expires' is not recognized as an internal or external command,
operable program or batch file.

'response-cache-control' is not recognized as an internal or external command,
operable program or batch file.

'response-content-disposition' is not recognized as an internal or external command,
operable program or batch file.

'response-content-encoding' is not recognized as an internal or external command,
operable program or batch file.

'response-content-type' is not recognized as an internal or external command,
operable program or batch file.

'Signature' is not recognized as an internal or external command,
operable program or batch file.
1
  • 3
    put the URL in quotes C:\wget-1.19.1-win64>wget "http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT&Expires=1510149040&response-cache-control=public%2C%20max-age%3D2592000&response-content-disposition=attachment%3B%20filename%3D%22%27Til%20Death%20Season%201.rar%22&response-content-encoding=System.Text.UTF8Encoding&response-content-type=application%2Foctet-stream&Signature=FYX3YEWDXD%2Bfd5X98fzrQEjZ1vw%3D"
    – Narzard
    Oct 9, 2017 at 14:38

1 Answer 1

1

& is used to separate commands in Windows shells. With your command, you're executing this:

C:\wget-1.19.1-win64> wget http://rgwha1.elcld.com/Public/1996747932?AWSAccessKeyId=ZTCEWB8UCH1HR47ZQJYT
C:\wget-1.19.1-win64> Expires=1510149040
C:\wget-1.19.1-win64> response-cache-control=public%2C%20max-age%3D2592000
[...]
  • Your link is truncated, making the request invalid (hence the error code 400 - bad request)
  • Your shell has no idea what Expires, response-cache-control, etc. means.

Try escaping the URL so that the shell recognises the & as part of the URL and not as a delimiter.

2
  • thank you for your answer if I put my URL in quotes it gives a long name error I just make a shortened URL of the link using google
    – ALI HANI
    Oct 13, 2017 at 10:24
  • and this worked fine :)
    – ALI HANI
    Oct 13, 2017 at 10:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .