How would you extract text from the MS-DOS command line? For example:
echo dir > new.txt

How would you get it to input "dir" into the command line. I know in that instance you could just pipe it into new.bat, but I want to know for any general curcumstance.