- Oct
- 364
- 17
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 MyPC_C Serial number is 1234:abcd
Directory of C:\Program Files\JPSoft\TCMD18_x64\Styles\*
11/20/2016 23:07 <DIR> .
11/20/2016 23:07 <DIR> ..
5/06/2014 17:20 1,436,672 Office2007.dll
5/06/2014 17:19 1,445,376 Office2010.dll
3,444,736 bytes in 2 files and 2 dirs 3,452,928 bytes allocated
14,538,584,064 bytes free
Or possibly instead, redirect output to an array variable, with each line in a separate array node.
... Maybe both.
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 MyPC_C Serial number is 1234:abcd
Directory of C:\Program Files\JPSoft\TCMD18_x64\Styles\*
11/20/2016 23:07 <DIR> .
11/20/2016 23:07 <DIR> ..
5/06/2014 17:20 1,436,672 Office2007.dll
5/06/2014 17:19 1,445,376 Office2010.dll
3,444,736 bytes in 2 files and 2 dirs 3,452,928 bytes allocated
14,538,584,064 bytes free
Or possibly instead, redirect output to an array variable, with each line in a separate array node.
... Maybe both.