CooperBuckeye05
CooperBuckeye05

Reputation: 159

wget corrupted file .zip file error

I am using wget to try and download two .zip files (SWVF_1_44.zip and SWVF_44_88.zip) from this site: http://www2.sos.state.oh.us/pls/voter/f?p=111:1:0::NO:RP:P1_TYPE:STATE

when I run:

wget -r -l1 -H -t1 -nd -N -np -A.zip -erobots=off "http://www2.sos.state.oh.us/pls/voter/f?p=111:1:0::NO:RP:P1_TYPE:STATE/SWVF_1_44.zip"

I get a downloaded zip file that has a screwed up name (f@p=111%3A1%3A0%3A%3ANO%3ARP%3AP1_TYPE%3ASTATE%2FSWVF_1_44) and it cannot be opened.

Any thoughts on where my code is wrong?

Upvotes: 0

Views: 3142

Answers (1)

Marc B
Marc B

Reputation: 360662

There's nothing "wrong" with your code. Wget is simply assuming you want to save the file in the same name that appears in the url. Use the -O option to specify an output file:

wget blahblahblah -O useablefilename.zip

Upvotes: 2

Related Questions