Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am programming in batch it shouldn't matter because i am using wget on Windows too.

I found similar question on this site Force wget to use actual filename first solution works for everyone but why it doesn't working for me ? I am getting following error.

C:\Users\MYNAME\Documents\TemObv\GnuWin32\bin>wget --content-disposition 'http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE'

SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Users\MYNAME\Documents\TemObv\GnuWin32/etc/wgetrc
'http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE': Unsupported scheme.


C:\Users\MYUSER\Documents\TemObv\GnuWin32\bin>wget --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls"
SYSTEM_WGETRC = c:/progra~1/wget/etc/wgetrc
syswgetrc = C:\Users\MYUSER\Documents\TemObv\GnuWin32/etc/wgetrc
--2012-11-20 15:11:40--  http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls
Resolving spreadsheets.google.com...,,, ...
Connecting to spreadsheets.google.com||:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls [following]
--2012-11-20 15:11:40--  https://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&output=xls
Connecting to spreadsheets.google.com||:443... connected.
ERROR: cannot verify spreadsheets.google.com's certificate, issued by `/C=US/O=Google Inc/CN=Google Internet Authority':
  Unable to locally verify the issuer's authority.
To connect to spreadsheets.google.com insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
share|improve this question
You are using --content-disposition without specifying a content disposition to use. Don't do that. –  psusi Nov 20 '12 at 20:55
--content-disposition tells wget it should honor the Content-Disposition header, it does no take any argument... –  andrekeller Nov 20 '12 at 21:05
so what should I do ? –  Mowgli Nov 20 '12 at 21:08

1 Answer 1

up vote 1 down vote accepted

If I remember correctly you'd have to use double quotes (") around the url...

wget --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE"

If this redirects you to https and you dont have the certificates installed you might need to issue the following instead:

wget --no-check-certificate --content-disposition "http://spreadsheets.google.com/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE"
share|improve this answer
I tried that, but it goes me this error check edit. –  Mowgli Nov 20 '12 at 21:11
well then just do as proposed in the error message. Your installation does not know the google certificate: wget --no-check-certificate --content-disposition "spreadsheets.google.com/…; –  andrekeller Nov 20 '12 at 21:13
Man you are the GURU..... I am sure lots of people will find this helpfull. your comment solution worked Thanks alot. –  Mowgli Nov 20 '12 at 21:20
I don't have 15 reps but I would've gave you +UP, is there something I can put in code where if I run code again it will override existing file ? –  Mowgli Nov 20 '12 at 21:22
No problem at all... I just updated the answer... –  andrekeller Nov 20 '12 at 21:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.