The syntax is:

Drive:\BatFolder\BatchName.bat>Drive:\LogFolder\LogName.log 2>&1

To test this, create c:\zzz\batch1.bat which contains:

@echo on
REM z: is an invalid drive letter
z:
c:
cd c:\zzz
copy batch1.bat copy.tmp
ren copy.tmp ren.tmp
dir
exit


At a command prompt, type:

c:\zzz\batch1.bat>c:\temp\batch1.log 2>&1

When you open c:\temp\batch1.log, you will see:


X:\>REM z: is an invalid drive letter

X:\>z:
The system cannot find the drive specified.

X:\>c:

C:\>cd c:\zzz

C:\ZZZ>copy batch1.bat copy.tmp
1 file(s) copied.

C:\ZZZ>ren copy.tmp ren.tmp

C:\ZZZ>dir
Volume in drive C is NTDISK
Volume Serial Number is 1C91_4321

Directory of C:\ZZZ

04/21/98   11:09a     <DIR>     .
04/21/98   11:09a     <DIR>     ..
04/21/98   11:04a         319 batch1.bat
04/21/98   11:04a         319 ren.tmp
         4 File(s)         638 bytes
             834,271,232 bytes free

C:\ZZZ>exit


If you wish to fully log a scheduled job, put the command in another batch file. Example: c:\zzz\batch0.bat contains:

c:\zzz\batch1.bat>c:\temp\batch1.log 2>&1

Then schedule c:\zzz\batch0.bat:

AT hh:mm cmd /c "c:\zzz\batch0.bat"