Coloque o endereço entre aspas, por exemplo:
wget.exe "http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf"
Estou tentando fazer o download de um arquivo de uma URL com esta aparência:
http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf
Dentro do navegador, este link me pede para baixar um arquivo chamado x.pdf, independentemente do que o DEF é (mas 'x.pdf' é o conteúdo correto).
No entanto, usando o wget, recebo o seguinte:
>wget.exe http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
--2011-01-06 07:52:05-- http://pdf.example.com/filehandle.ashx?p1=ABC
Resolving pdf.example.com... 99.99.99.99
Connecting to pdf.example.com|99.99.99.99|:80... connected.
HTTP request sent, awaiting response... 500 Internal Server Error
2011-01-06 07:52:08 ERROR 500: Internal Server Error.
'p2' is not recognized as an internal or external command,
operable program or batch file.
Isso está em um sistema Windows Vista
Editar1
>wget.exe "http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf"
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Program Files\GnuWin32/etc/wgetrc
--2011-02-06 10:18:31-- http://pdf.example.com/filehandle.ashx?p1=ABC&p2=DEF.pdf
Resolving pdf.example.com... 99.99.99.99
Connecting to pdf.example.com|99.99.99.99|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4568 (4.5K) [image/JPEG]
Saving to: 'filehandle.ashx@p1=ABC&p2=DEF.pdf'
100%[======================================>] 4,568 --.-K/s in 0.1s
2011-02-06 10:18:33 (30.0 KB/s) - 'filehandle.ashx@p1=ABC&p2=DEF.pdf'
saved [4568/4568]