I first introduced the subject in tip 501.
Here are two twists on the technique.
1. Pipe a scheduled job: AT hh:mm cmd /c batchfile.bat ^>c:\folder\batchlog.log 2^>^&1
2. Build a general purpose batch file pipe.bat which contains:
@echo off
@echo PIPE.BAT %1 %2 %3 %4 %5 %6 %7 %8 %9 > %1
cmd /c %2 %3 %4 %5 %6 %7 %8 %9 >> %1 2>>&1
Example:
pipe d:\temp\batchfile.log batchfile.bat param1 param2 .. paramn
0 comments
Hide comments