cscript //nologo versioninfo.vbs Kernel Kernel\bin\Release\Kernel.exe
This script returns me a version of my Kernel file. Let's say 3.11
Now I want to create a directory containing that 3.11.
set version=cscript //nologo versioninfo.vbs Kernel Kernel\bin\Release\Kernel.exe
set destination=\MyProgram(%version%)
if not exist %destination% mkdir %destination%
but it doesn't create it with the name
MyProgram(3.11)
as expected but creates as
MyProgram(cscript //nologo versioninfo.vbs Kernel Kernel\bin\Release\Kernel.exe)
So I need my cscript output set as a text so I could just insert it into my destination.
Solution:
cscript //nologo versioninfo.vbs Kernel Kernel\bin\Release\Kernel.exe > tmp
SET /p version= < tmp