Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a URL with GET query parameters using the command line in Windows [duplicate]

Possible Duplicate:
How do I escape ampersands in batch files?

I am attempting the following, in Windows:

 $ start http://code.google.com/p/mulder/downloads/detail?name=MPUI.2011-06-09.Full-Package.exe&can=2&q=MPlayer&sort=-uploaded

Unfortunately, it seems that no amount of quoting or escaping actually pulls up the full URL in a browser, only partial (up through can=2) or what not. How can I do it?

like image 397
rogerdpack Avatar asked Jun 16 '11 16:06

rogerdpack


2 Answers

You can use ^ to escape & in teh command line like this:

 $ start http://code.google.com/p/mulder/downloads/detail?name=MPUI.2011-06-09.Full-Package.exe^&can=26^&q=MPlayer^&sort=-uploaded
like image 187
Tom Hazel Avatar answered Sep 27 '22 20:09

Tom Hazel


Try this

start "test" "C:\Program Files (x86)\Internet Explorer\iexplore.exe" "http://code.google.com/p/mulder/downloads/detail?name=MPUI.2011-06-09.Full-Package.exe&can=2&q=MPlayer&sort=-uploaded"

It worked for me in Windows 7. (all on one line).

I hope this helps.

like image 36
shellter Avatar answered Sep 27 '22 21:09

shellter