Maybe you can redirect output from your DOS commands to a physical file and read the file content.
A DOS command can create a new output file by adding "> filename" after the command (such as "Dir > output.txt") and append to an existing file by using ">>" instead of ">".