It may already be possible to do this, but if not--redirect command output to a user-defined variable instead of to a file, including any CR/LF's:
MyVar would be a variable, not the name of a file.
DIR > MyVar
Echo %MyVar
[C:\Program Files\JPSoft\TCMD18_x64\Styles]dir
Volume in drive C is...