Hello,
In a DOS\Console batch file I need to output all information (standard output and error output) to both the screen AND a log type file. Ideally I Do NOT want to use two lines every time I need to output a message (one to screen and one to file - yuk). Here is an example output line:
set MYFILE=c:\temp\myfile.log
set FILE_TYPE=Export
echo %time% - Transferring %FILE_TYPE%
I know I can append this to a file using:
echo %time% - Transferring %FILE_TYPE% >> %MYFILE%
OR even
echo %time% - Transferring %FILE_TYPE% >> %MYFILE% 2>&1
My problem is if the above is used I do not get any screen output. I feel I am close.
What can you suggestion?
Thanks,
Michael4606
When I do this I cannot
Start Free Trial