I am using a combined batch and java script I found to retrieve the html from a web site using a batch file and one we address is not returning the desired output as it appe
call the cscript like that:
cscript //E:JScript "%~dpnx0" "%~1"
I dont think the spaces needs to be encoded but rather the double quotes (with %22
) though this could require to parse the whole command line (%*
) you can try something like
setlocal enableDelayedExpansion
set "link=%*"
set "link=!link:"=%%22!"
....
cscript //E:JScript "%~dpnx0" "%link%"
You can also try with named arguments and pass the whole command line to the script.