SQL Spool equivalent command in DOS

This question maybe in the wrong category but I'm posting here due to urgency.
In DOS is there a command to perform a similar function to spool command in SQL or Script command in UNIX?
I want to print all command line output to a file but I don't want to use the echo command for each line.

Any help will be appreciated.

Steve

I have moved this to the appropriate forum.

The easiest way to achieve this would be to put all your commands into a batch file, and then redirect the output.

C:\putty>type foo.bat
echo "this is my batch file"
dir

C:\putty>foo.bat > foo.out 2>&1

C:\putty>type foo.out

C:\putty>echo "this is my batch file"
"this is my batch file"

C:\putty>dir
 Volume in drive C is SYSTEM
 Volume Serial Number is E032-0520

 Directory of C:\putty

17/01/2006  22:36    <DIR>          .
17/01/2006  22:36    <DIR>          ..
17/01/2006  22:34                36 foo.bat
17/01/2006  22:36                 0 foo.out
18/09/2005  03:03           131,072 pageant.exe
18/09/2005  03:03           266,240 plink.exe
18/09/2005  03:03           286,720 pscp.exe
18/09/2005  03:03           286,720 psftp.exe
18/09/2005  01:30            29,267 putty.cnt
18/09/2005  03:03           430,080 putty.exe
18/09/2005  01:30           595,500 putty.hlp
18/09/2005  03:03           167,936 puttygen.exe
              10 File(s)      2,193,571 bytes
               2 Dir(s)  24,182,276,096 bytes free

Yes... UNIX-style redirection works in "cmd" :eek:

Cheers
ZB

Thanks zazzybob!