In linux it would be as easy as:
var = `command $url`
var = $ (command $url)
But in batch I am trying with a for but it is not taking me the content of the variable% URL%:
set URL=pagina.com:435435
for /f %%i in ('command %URL%') do set TITULO=%%i
Does anyone know what's going on?
The following works on a CMD command line and accomplishes assigning the output of a command to a variable.
shell:
bat or cmd file:
Since you use a for there may be more than one value for the TITLE variable, if you want to keep them all in something like a list you can use the following:
bat or cmd file:
Try this: