From a cmd:
&
is escaped like this: ^&
(based on @Wael Dalloul's answer)%
does not need to be escapedAn example:
start http://www.google.com/search?client=opera^&rls=en^&q=escape+ampersand%20and%20percentage+in+cmd^&sourceid=opera^&ie=utf-8^&oe=utf-8
From a batch file
&
is escaped like this: ^&
(based on @Wael Dalloul's answer)%
is escaped like this: %%
(based on the OPs update)An example:
start http://www.google.com/search?client=opera^&rls=en^&q=escape+ampersand%%20and%%20percentage+in+batch+file^&sourceid=opera^&ie=utf-8^&oe=utf-8