Can you redirect the output of a command to a variable with pipes?
I haven\'t tried much as I haven\'t been able to think of anything to try, but I have tried one me
You can set the output to a temporary file and the read the data from the file after that you can delete the temporary file.
echo %date%>temp.txt set /p myVarDate= < temp.txt echo Date is %myVarDate% del temp.txt
In this variable myVarDate contains the output of command.
myVarDate