(This is on NT based Windows like 2000, XP, Vista, 7)
On the command-line, the percentage characters are ignored:
wget "http://www.justitie.nl/images/Handleiding%20voor%20verwerkers%20persoonsgegevens_tcm34-3940.pdf"
So it correctly downloads this file (each %20 becomes a space):
"http://www.justitie.nl/images/Handleiding voor verwerkers persoonsgegevens_tcm34-3940.pdf"
But inside a batchfile, all the %20 are being interpreted as expanding parameter 2 (which is empty) resulting in this file to get downloaded (each %20 becomes 0):
"http://www.justitie.nl/images/Handleiding0voor0verwerkers0persoonsgegevens_tcm34-3940.pdf"
Is there a way to circumvent the percentage parameter expansion?
–jeroen
Solution:
Double the percent sign:
wget "http://www.justitie.nl/images/Handleiding%%20voor%%20verwerkers%%20persoonsgegevens_tcm34-3940.pdf"