I'm developing a batch script to run in MS-DOS
and I need to capture the output of an application running on a variable, which can be used during the execution of the .bat
file. The command line that provides the desired result is:
C:\>youtube-dl -e https://www.youtube.com/watch?v=T084eSHL6P8
The above command, when run at the MS-DOS prompt, provides the following output:
"Youtube-dl for windows - Baixando canais inteiros do youtube."
In my file .bat
I am using the following line to capture and store the result of executing the command:
set var=(youtube-dl -e https://www.youtube.com/watch?v=T084eSHL6P8)
The result is not expected, ie it displays exactly the string above, however, what is the correct way to assign the result of the command to a variable?
Thanks in advance for any help,
regards
Augusto Cesar