From rpboll:
>D:\testing\batch1.bat > D:\Testing\batch1LOG.txt
The redirection operator '>' is more completely spelled
'1>'. The numeral is the file number of the stream:
0=standard input stream;
1=standard output stream;
2=standard error stream.
If you want 1 and 2 to go to the same file then redirect
one to the other then the other to the file (paths
trimmed for clarity):
batch1.bat 2>&1 1> batch1LOG.txt
Since 'batch1.bat' is a script the current command
interpreter is transferred to it and does not return. If
it were a command, COM, or EXE it would return. If you
want to return from the script then use CALL:
CALL batch1.bat 2>&1 1> batch1LOG.txt
Frank