pre: I already looked at this, but it does not work in my case. How do I escape ampersands in batch files?
In a (Win10) batch file for cmd, I get passed some arguments and I want to send them via WGET.exe %set_var% to my web server.
What i need is the resulting string for WGET in a set-variable which should read like:
<ipaddress&port>?p1=%1%&p2=%2%&p3=%3% ...
I tried to escape the & with ^ and wrote ^& everywhere the & should appear like this line:
set zzz="%wget_addr%?p1=%1%^&p2=%2%^&p3=%3%^&p4=%4%^&p5=%5%^&date=%date%^&time=%time%"
wget.exe %zzz%
But it does not work. The result is just a concettenation of the arguments, but my variables are missing.
What do I miss to code? Thanks a lot!